From: Arne Fitzenreiter Date: Wed, 23 Jul 2008 18:53:51 +0000 (+0200) Subject: Fix checkfstab script not correct detect current rootdevice X-Git-Tag: v2.3-beta2~6^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7748862f8876f19195666d1da64aafef7d8b1bd;p=ipfire-2.x.git Fix checkfstab script not correct detect current rootdevice --- diff --git a/src/initscripts/init.d/checkfstab b/src/initscripts/init.d/checkfstab index 0ccf593d99..5aab8690b2 100644 --- a/src/initscripts/init.d/checkfstab +++ b/src/initscripts/init.d/checkfstab @@ -18,8 +18,9 @@ case "${1}" in start) boot_mesg "Checking fstab rootdevice entry ..." - OLDROOT=`cat /etc/fstab | grep " / " | cut -d" " -f1`; - NEWROOT=`df | grep " /$" -m1 | cut -d" " -f1`; + ROOTPOS=`expr index "$CMDLINE" root=` + NEWROOT=`echo ${CMDLINE:$ROOTPOS} | cut -d"=" -f2 | cut -d" " -f1`; + OLDROOT=`cat /etc/fstab | grep -m1 " / " | cut -d" " -f1`; OLDDRV=${OLDROOT::`expr length $OLDROOT`-1} NEWDRV=${NEWROOT::`expr length $NEWROOT`-1} if [ "$OLDROOT" == "$NEWROOT" ]; then