You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
657 B

  1. #!/bin/sh
  2. # Copyright 2010 Vertical Communications
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. #
  6. fsck_dosfsck() {
  7. dosfsck -p "$device" 2>&1 | logger -t "fstab: dosfsck ($device)"
  8. local status="$?"
  9. case "$status" in
  10. 0|1) ;; #success
  11. 2) reboot;;
  12. 4) echo "dosfsck ($device): Warning! Uncorrected errors."| logger -t fstab
  13. return 1
  14. ;;
  15. *) echo "dosfsck ($device): Error $status. Check not complete."| logger -t fstab;;
  16. esac
  17. return 0
  18. }
  19. fsck_dos() {
  20. fsck_dosfsck "$@"
  21. }
  22. fsck_vfat() {
  23. fsck_dosfsck "$@"
  24. }
  25. append libmount_known_fsck "dos"
  26. append libmount_known_fsck "vfat"