From 3228db8a5fc703579250b7656bf5ea4c876aa099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Wed, 9 Jun 2010 00:47:17 +0200 Subject: Initialize /etc/mtab by copying /proc/mounts Our current process of initializing /etc/mtab is hackish and probably error-prone, replace it by simply copying /proc/mounts. --- rc.sysinit | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index 6d4c917..c62ae8d 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -297,13 +297,7 @@ fi stat_busy "Mounting Local Filesystems" /bin/mount -n -o remount,rw / -: >| /etc/mtab -# make sure / gets written to /etc/mtab -/bin/mount -o remount,rw / -# Write /proc, /sys and /dev to /etc/mtab -if [ -e /proc/mounts ]; then - /bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab -fi +cat /proc/mounts >| /etc/mtab run_hook sysinit_premount # now mount all the local filesystems /bin/mount -a -t $NETFS -O no_netdev -- cgit v1.2.3