home *** CD-ROM | disk | FTP | other *** search
/ ftp.eterna.com.au / 2014.06.ftp.eterna.com.au.tar / ftp.eterna.com.au / pub / rc.d.tar.gz / rc.d.tar / rc.d / fsck < prev    next >
Text File  |  1998-09-23  |  618b  |  43 lines

  1. #! /bin/sh
  2.  
  3. # PROVIDE: fsck
  4. # REQUIRE: localswap ccd
  5.  
  6. if [ -e /fastboot ]; then
  7.     echo "Fast boot: skipping disk checks."
  8. elif [ "$1" = autoboot ]; then
  9.     echo "Automatic boot in progress: starting file system checks."
  10.     fsck -p
  11.     case $? in
  12.     0)
  13.         ;;
  14.     2)
  15.         exit 1
  16.         ;;
  17.     4)
  18.         echo "Rebooting..."
  19.         reboot
  20.         echo "Reboot failed; help!"
  21.         exit 1
  22.         ;;
  23.     8)
  24.         echo "Automatic file system check failed; help!"
  25.         exit 1
  26.         ;;
  27.     12)
  28.         echo "Boot interrupted."
  29.         exit 1
  30.         ;;
  31.     130)
  32.         # interrupt before catcher installed
  33.         exit 1
  34.         ;;
  35.     *)
  36.         echo "Unknown error; help!"
  37.         exit 1
  38.         ;;
  39.     esac
  40. fi
  41.  
  42. trap "echo 'Boot interrupted.'; exit 1" 3
  43.