diff --git a/etc/rc.d/init.d/mountfs b/etc/rc.d/init.d/mountfs index 391f699..ebd507f 100755 --- a/etc/rc.d/init.d/mountfs +++ b/etc/rc.d/init.d/mountfs @@ -18,15 +18,12 @@ case "$1" in # Dump dmesg to log file dmesg > /var/log/dmesg.log - # Clean and recreate /etc/mtab - rm -f /etc/mtab # delete in case of symlink - cat /proc/mounts | \ - grep -v "^rootfs" | \ - grep -v "^/dev/cloop" | \ - grep -v "^devfs" | \ - grep -v "^sysfs" | \ - grep -v "^/dev/root.old" >/etc/mtab - rm -f /etc/mtab~ /etc/mtab~~ + # Check that mtab is a symlink to /proc/mounts + [ -L /etc/mtab ] || { + rm -f /etc/mtab # delete if not a symlink + rm -f /etc/mtab~ /etc/mtab~~ + ln -s /proc/mounts /etc/mtab + } $PLYMOUTH --sysinit @@ -45,9 +42,6 @@ case "$1" in ;; stop) echo -n "Unmounting all other currently mounted file systems: " - # remove data= in /etc/mtab to prevent problems when system reboots with different mode - # (as with kernel 2.6.30 upgrade) - sed -i "s|[,]*data=[a-z]*||" /etc/mtab # [ -f /proc/bus/usb/devices ] && umount /proc/bus/usb >/dev/null 2>&1 # umount -l /proc # umount -l /sys