2
0

late-filesystems.sh 718 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. # A list of devices to mount. These must have a mount point specified in
  3. # /etc/fstab (and should be set "noauto" to prevent earlier mounting).
  4. LATE_FILESYSTEMS=""
  5. RESULT=0
  6. if [ "$1" = start ]; then
  7. PATH=/usr/bin:/usr/sbin:/bin:/sbin
  8. if [ ! -z "$LATE_FILESYSTEMS" ]; then
  9. for FS in $LATE_FILESYSTEMS; do
  10. fsck -a "$FS"
  11. fsckresult=$?
  12. if [ $(( $fsckresult & ~(1 + 32) )) -eq 0 ]; then
  13. mount "$FS"
  14. mntresult=$?
  15. if [ $mntresult -ne 0 ]; then
  16. RESULT=$mntresult
  17. fi
  18. else
  19. RESULT=$fsckresult
  20. fi
  21. done
  22. fi
  23. fi
  24. exit $RESULT