--- rc.sysinit.bak 2010-02-19 15:27:41.000000000 +0100 +++ /etc/rc.sysinit 2010-02-19 17:08:32.000000000 +0100 @@ -225,10 +225,29 @@ } if [ -x /sbin/fsck ]; then - stat_busy "Checking Filesystems" + stat_busy "Checking Filesystems (abort with pressing the escape-key)" FSCK_OUT=/dev/stdout FSCK_ERR=/dev/null - /sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK >$FSCK_OUT 2>$FSCK_ERR + /sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK >$FSCK_OUT 2>$FSCK_ERR & + fsckpid=$! + + user_aborted=0 + unset REPLY + while : ;do + read -s -n 1 -t 3 + case "$REPLY" in + ) + /bin/kill $fsckpid + user_aborted=1 + break + ;; + esac + if ! [ $(/usr/bin/pgrep $fsckpid) ];then + break + fi + done + wait $fsckpid + fsckret=$? if [ ${fsckret} -gt 1 ]; then stat_fail @@ -259,6 +278,16 @@ /sbin/sulogin -p fsck_reboot fi + if [ ${fsckret} -eq 32 ] && [ $user_aborted -eq 1 ] ; then + echo + echo "**************** FILESYSTEM CHECK ABORTED *****************" + echo "* *" + echo "* The filesystem check has been aborted by the user. It *" + echo "* will be repeated with the next boot. *" + echo "* *" + echo "************************************************************" + echo + fi stat_done fi