Generate symlink /etc/mtab pointing to /proc/mounts [Closes: issue1277]
[grml-autoconfig.git] / grml-autoconfig
index cd584f2..c0c1d47 100755 (executable)
@@ -56,13 +56,10 @@ mount_sys
 # {{{ main grml-autoconfig
 checkvalue $CONFIG_DEBUG && config_debug
 
-# update /etc/mtab if running in live-initramfs mode:
-if [ -z "$INSTALLED" -a -e /live/cow ] ; then
-   if ! grep -q rootfs /etc/mtab ; then
-      for i in rootfs "none /sys sysfs" proc ${LIVECD_PATH} /live/cow /lib/init/rw /dev/shm /dev/pts ; do
-          grep $i /proc/mounts | grep -v /dev/.static >> /etc/mtab
-      done
-   fi
+# make sure symlink /etc/mtab exists, this is usually handled by
+# /etc/init.d/checkroot.sh but we don't execute this script on the live system
+if [ -z "$INSTALLED" ] ; then
+  ln -sf /proc/mounts /etc/mtab
 fi
 
 stage=5