aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit13
1 files changed, 2 insertions, 11 deletions
diff --git a/rc.sysinit b/rc.sysinit
index 6455566..746b0ad 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -198,17 +198,8 @@ fsck_reboot $fsckret
status "Remounting Root Read/Write" \
mount -n -o remount,rw /
-# don't touch /etc/mtab if it is a symlink to /proc/self/mounts
-if [[ ! -L /etc/mtab ]]; then
- stat_busy "Creating mtab"
- rm -f /etc/mtab~* # delete any stale locks
- if [[ -x $(type -P findmnt) && -e /proc/self/mountinfo ]]; then
- findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab
- else
- cat /proc/mounts >| /etc/mtab
- fi
- (( $? == 0 )) && stat_done || stat_fail
-fi
+# force linkage of /etc/mtab to the kernel
+[[ -L /etc/mtab ]] || ln -sf /proc/self/mounts /etc/mtab
# now mount all the local filesystems
run_hook sysinit_premount