From be8b6f59470b8779c3d4e10b3045507920931896 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Sat, 4 Oct 2003 07:41:42 +0000 Subject: added -x check to /sbin/fsck, so reiserfs users can uninstall e2fsprogs without script errors --- rc.sysinit | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index bd1d590..4ee2693 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -31,29 +31,31 @@ status "Activating Swap" /sbin/swapon -a status "Mounting Root Read-only" /bin/mount -n -o remount,ro / -stat_busy "Checking Filesystems" -/sbin/fsck -A -T -C -a -if [ $? -gt 1 ]; then - stat_fail - 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 maintainance shell the system will *" - echo "* reboot automatically. *" - echo "* *" - echo "************************************************************" - echo - /sbin/sulogin -p - echo "Automatic reboot in progress..." - /bin/umount -a - /bin/mount -n -o remount,ro / - /sbin/reboot -f - exit 0 +if [ -x /sbin/fsck ]; then + stat_busy "Checking Filesystems" + /sbin/fsck -A -T -C -a + if [ $? -gt 1 ]; then + stat_fail + 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 maintainance shell the system will *" + echo "* reboot automatically. *" + echo "* *" + echo "************************************************************" + echo + /sbin/sulogin -p + echo "Automatic reboot in progress..." + /bin/umount -a + /bin/mount -n -o remount,ro / + /sbin/reboot -f + exit 0 + fi + stat_done fi -stat_done stat_busy "Mounting Local Filesystems" /bin/mount -n -o remount,rw / -- cgit v1.2.3