summaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit7
1 files changed, 6 insertions, 1 deletions
diff --git a/rc.sysinit b/rc.sysinit
index 6ed8e1a..9973c25 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -279,11 +279,16 @@ fi
stat_busy "Mounting Local Filesystems"
/bin/mount -n -o remount,rw /
-if [ -x /bin/findmnt -a -e /proc/self/mountinfo ]; then
+
+# don't touch /etc/mtab if it is a symlink to /proc/self/mounts
+if [[ -L /etc/mtab ]]; then
+ ;
+elif [[ -x /bin/findmnt -a -e /proc/self/mountinfo ]]; then
/bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS >| /etc/mtab
else
cat /proc/mounts >| /etc/mtab
fi
+
run_hook sysinit_premount
# now mount all the local filesystems
/bin/mount -a -t $NETFS -O no_netdev