[adm5120] fix support for 2.6.38 kernel
[openwrt.git] / package / e2fsprogs / files / e2fsck.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_e2fsck() {
8 e2fsck -p "$device" 2>&1 | logger -t "fstab: e2fsck ($device)"
9 local status="$?"
10 case "$status" in
11 0|1) ;; #success
12 2) reboot;;
13 4) echo "e2fsck ($device): Warning! Uncorrected errors."| logger -t fstab
14 return 1
15 ;;
16 *) echo "e2fsck ($device): Error $status. Check not complete."| logger -t fstab;;
17 esac
18 return 0
19 }
20
21 fsck_ext2() {
22 fsck_e2fsck "$@"
23 }
24
25 fsck_ext3() {
26 fsck_e2fsck "$@"
27 }
28
29 fsck_ext4() {
30 fsck_e2fsck "$@"
31 }
32
33 append libmount_known_fsck "ext2"
34 append libmount_known_fsck "ext3"
35 append libmount_known_fsck "ext4"
This page took 0.03937 seconds and 5 git commands to generate.