ksymoops: remove package, it has been obsolete and useless for a long time
[packages.git] / utils / dosfstools / files / dosfsck.sh
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
7 fsck_dosfsck() {
8         dosfsck -p "$device" 2>&1 | logger -t "fstab: dosfsck ($device)"
9         local status="$?"
10         case "$status" in
11                 0|1) ;; #success
12                 2) reboot;;
13                 4) echo "dosfsck ($device): Warning! Uncorrected errors."| logger -t fstab
14                         return 1
15                         ;;
16                 *) echo "dosfsck ($device): Error $status. Check not complete."| logger -t fstab;;
17         esac
18         return 0
19 }
20
21 fsck_dos() {
22         fsck_dosfsck "$@"
23 }
24
25 fsck_vfat() {
26         fsck_dosfsck "$@"
27 }
28
29 append libmount_known_fsck "dos"
30 append libmount_known_fsck "vfat"