System information

82 Sharing and maintaining SLES 10 SP2 Linux under z/VM
if test -n "$ROOTFS_BLKDEV" -a "$ROOTFS_BLKDEV" != "/" -a -b "$ROOTFS_BLKDEV" ;
then
MAY_FSCK=1
fi
fi
#
FSCK_FORCE=""
if test -f /forcefsck ; then
FSCK_FORCE="-f"
ROOTFS_FSCK=""
fi
if test "$ROOTFS_FSCK" = "0" ; then
# already checked and ok, skip the rest
MAY_FSCK=0
fi
if test ! -f /fastboot -a -z "$fastboot" -a $MAY_FSCK -eq 1 ; then
# on an umsdos root fs this mount will fail,
# so direct error messages to /dev/null.
# this seems to be ugly, but should not really be a problem.
mount -n -o remount,ro / 2> /dev/null
if test $? = 0; then
if test -n "$ROOTFS_FSCK" ; then
FSCK_RETURN=$ROOTFS_FSCK
else
# ROR: chg 2
# echo "Checking root file system..."
# fsck $FSCK_PROGRESSBAR -a $FSCK_FORCE $ROOTFS_BLKDEV
echo "Checking /local filesystem..."
fsck $FSCK_PROGRESSBAR -a $FSCK_FORCE /local
# A return code of 1 indicates that file system errors
# were corrected, but that the boot may proceed.
# A return code of 2 or larger indicates failure.
FSCK_RETURN=$?
fi
test $FSCK_RETURN -lt 4
rc_status -v1 -r
if test $FSCK_RETURN -gt 1 -a $FSCK_RETURN -lt 4 ; then
# if appropriate, switch bootsplash to verbose
# mode to make text messages visible.
test -f /proc/splash && echo "verbose" > /proc/splash
echo
echo "fsck succeed, but reboot is required."
echo
sleep 1
sync
reboot -f
elif test $FSCK_RETURN -gt 3; then
# if appropriate, switch bootsplash to verbose
# mode to make text messages visible.
test -f /proc/splash && echo "verbose" > /proc/splash
# Stop blogd since we reboot after sulogin
test -x /sbin/blogd && killproc -QUIT /sbin/blogd
if test -x /etc/init.d/kbd ; then
/etc/init.d/kbd start
fi
echo
echo "fsck failed. Please repair manually and reboot."
echo "The /local file system is currently mounted read-only.
echo To remount it read-write do:"
echo