All pastes #67646 Raw Edit

original

public text v1 · immutable
#67646 ·published 2006-06-20 12:17 UTC
rendered paste body
title "Checking file systems."
        fsck -A -C -a ; fsckrc=$?
        if   [ $(( $fsckrc & ~3 )) != 0 ] ; then
                echo " **"
                echo " ** Filesystem  || error=$? failed (returncode=$fsckrc)."
                echo " ** Please repair the broken disk(s) manually."
                echo " **"
                sulogin -t 600 /dev/console
                umount -arv ; /sbin/reboot -d -f
                while true ; do sleep 1 ; done
        elif [ $(( $fsckrc &  2 )) != 0 ] ; then
                for x in 10 9 8 7 6 5 4 3 2 ; do
                        echo -en "\rSystem reboot in $x seconds ... "
                        sleep 1
                done ; echo -e "\rSystem reboot now!                 "
                umount -arv ; /sbin/reboot -d -f
                while true ; do sleep 1 ; done
        fi