aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/utils/e2fsprogs/files/.svn/text-base/e2fsck.sh.svn-base
diff options
context:
space:
mode:
authorJames <>2013-03-17 12:16:37 +0000
committerJames <>2013-03-17 12:16:37 +0000
commit27b76ab0671089c47506615a796a261e993896a7 (patch)
tree61213d67e7fa87b20356b23798558e2c4212c42f /package/system/utils/e2fsprogs/files/.svn/text-base/e2fsck.sh.svn-base
downloadtrunk-36060-master.tar.gz
trunk-36060-master.tar.bz2
trunk-36060-master.zip
Diffstat (limited to 'package/system/utils/e2fsprogs/files/.svn/text-base/e2fsck.sh.svn-base')
-rw-r--r--package/system/utils/e2fsprogs/files/.svn/text-base/e2fsck.sh.svn-base38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/system/utils/e2fsprogs/files/.svn/text-base/e2fsck.sh.svn-base b/package/system/utils/e2fsprogs/files/.svn/text-base/e2fsck.sh.svn-base
new file mode 100644
index 0000000..22031ed
--- /dev/null
+++ b/package/system/utils/e2fsprogs/files/.svn/text-base/e2fsck.sh.svn-base
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Copyright 2010 Vertical Communications
+# Copyright 2012 OpenWrt.org
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+fsck_e2fsck() {
+ set -o pipefail
+ e2fsck -p "$device" 2>&1 | logger -t "fstab: e2fsck ($device)"
+ local status="$?"
+ set +o pipefail
+ case "$status" in
+ 0|1) ;; #success
+ 2) reboot;;
+ 4) echo "e2fsck ($device): Warning! Uncorrected errors."| logger -t fstab
+ return 1
+ ;;
+ *) echo "e2fsck ($device): Error $status. Check not complete."| logger -t fstab;;
+ esac
+ return 0
+}
+
+fsck_ext2() {
+ fsck_e2fsck "$@"
+}
+
+fsck_ext3() {
+ fsck_e2fsck "$@"
+}
+
+fsck_ext4() {
+ fsck_e2fsck "$@"
+}
+
+append libmount_known_fsck "ext2"
+append libmount_known_fsck "ext3"
+append libmount_known_fsck "ext4"