Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 194615 | Differences between
and this patch

Collapse All | Expand All

(-)init.d/checkroot (-13 / +5 lines)
Lines 13-32 Link Here
13
	fi
13
	fi
14
	ebegin "Updating /etc/mtab"
14
	ebegin "Updating /etc/mtab"
15
15
16
	# Add the entry for / to mtab
16
	# With / as tmpfs we cannot umount -at tmpfs in localmount as that
17
	mount -f /
17
	# makes / readonly and dismounts all tmpfs even if in use which is
18
	# not good. Luckily, umount uses /etc/mtab instead of /proc/mounts
19
	# which allows this hack to work.
20
	grep -v "^[^ ]* / tmpfs" /proc/mounts > /etc/mtab
18
21
19
	# Don't list root more than once
20
	grep -v "^[^ ]* / " /proc/mounts >> /etc/mtab
21
22
	# Now make sure /etc/mtab have additional info (gid, etc) in there
23
	local mnt=
24
	mountinfo | while read mnt; do
25
		if fstabinfo --quiet "${mnt}"; then
26
			mount -f -o remount "${mnt}"
27
		fi
28
	done
29
30
	# Remove stale backups
22
	# Remove stale backups
31
	rm -f /etc/mtab~ /etc/mtab~~
23
	rm -f /etc/mtab~ /etc/mtab~~
32
	eend 0
24
	eend 0

Return to bug 194615