initscripts: misc changes, bump to 2009-03.
--HG-- extra : convert_revision : 97fb9127cb91659331f1574a19a8871fed30a0ab
This commit is contained in:
@@ -10,46 +10,48 @@ name="checkfs"
|
||||
start_cmd="checkfs_start"
|
||||
stop_cmd=":"
|
||||
|
||||
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk"
|
||||
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs"
|
||||
NETFS="$NETFS,nofuse,nofuseblk"
|
||||
|
||||
checkfs_start()
|
||||
{
|
||||
echo -n "=> Mounting root read-only... "
|
||||
echo -n "Mounting root read-only... "
|
||||
mount -n -o remount,ro /
|
||||
show_rval
|
||||
|
||||
FORCEFSCK=
|
||||
[ -f /forcefsck ] && FORCEFSCK="-- -f"
|
||||
|
||||
echo -n "=> Checking filesystems... "
|
||||
if grep -qw quiet /proc/cmdline; then
|
||||
fsck -A -T -C -a -t $NETFS $FORCEFSCK >/dev/null 2>&1
|
||||
else
|
||||
fsck -A -T -C -a -t $NETFS $FORCEFSCK 2>/dev/null
|
||||
fi
|
||||
echo "Checking local filesystems... "
|
||||
fsck -A -T -C -a -t $NETFS $FORCEFSCK 2>/dev/null
|
||||
fsckret=$?
|
||||
echo
|
||||
if [ ${fsckret} -gt 1 ]; then
|
||||
echo "failed!"
|
||||
if [ $((${fsckret}&2)) -eq 2 ]; then
|
||||
echo
|
||||
echo "********************** REBOOT REQUIRED *********************"
|
||||
echo "* *"
|
||||
echo "* The system will be rebooted automatically in 15 seconds. *"
|
||||
echo "* *"
|
||||
echo "************************************************************"
|
||||
echo "************** REBOOT REQUIRED *************"
|
||||
echo
|
||||
sleep 15
|
||||
echo " The system will be rebooted automatically"
|
||||
echo " in 5 seconds."
|
||||
echo
|
||||
echo "********************************************"
|
||||
echo
|
||||
sleep 5
|
||||
else
|
||||
echo
|
||||
echo "***************** FILESYSTEM CHECK FAILED ****************"
|
||||
echo "* *"
|
||||
echo "* Please repair manually and reboot. Note that the root *"
|
||||
echo "* file system is currently mounted read-only. To remount *"
|
||||
echo "* it read-write type: mount -n -o remount,rw / *"
|
||||
echo "* When you exit the maintenance shell the system will *"
|
||||
echo "* reboot automatically. *"
|
||||
echo "* *"
|
||||
echo "************************************************************"
|
||||
echo "********* FILESYSTEM CHECK FAILED ************"
|
||||
echo
|
||||
echo " Please repair manually and reboot. Note that"
|
||||
echo " the root filesystem is currently mounted"
|
||||
echo " read-only. To remount it read-write type:"
|
||||
echo
|
||||
echo " mount -n -o remount,rw /"
|
||||
echo
|
||||
echo " When you exit the maintenance shell the system"
|
||||
echo " will reboot automatically."
|
||||
echo
|
||||
echo "************************************************"
|
||||
echo
|
||||
sulogin -p
|
||||
fi
|
||||
@@ -59,7 +61,6 @@ checkfs_start()
|
||||
reboot -f
|
||||
exit 0
|
||||
fi
|
||||
show_rval
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
Reference in New Issue
Block a user