diff options
Diffstat (limited to 'package/system/utils/e2fsprogs/files')
5 files changed, 178 insertions, 0 deletions
diff --git a/package/system/utils/e2fsprogs/files/.svn/entries b/package/system/utils/e2fsprogs/files/.svn/entries new file mode 100644 index 0000000..b1253f7 --- /dev/null +++ b/package/system/utils/e2fsprogs/files/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/system/utils/e2fsprogs/files +svn://svn.openwrt.org/openwrt + + + +2013-01-29T10:48:46.063504Z +35375 +nbd + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +e2fsck.conf +file + + + + +2013-03-17T12:13:15.000000Z +feb48bdf416ced071d3d69a153ca0dd6 +2013-01-29T10:48:46.063504Z +35375 +nbd + + + + + + + + + + + + + + + + + + + + + +38 + +e2fsck.sh +file + + + + +2013-03-17T12:13:15.000000Z +d1b65dd91268e8988822b1a8df1e49ad +2013-01-29T10:48:46.063504Z +35375 +nbd + + + + + + + + + + + + + + + + + + + + + +784 + diff --git a/package/system/utils/e2fsprogs/files/.svn/text-base/e2fsck.conf.svn-base b/package/system/utils/e2fsprogs/files/.svn/text-base/e2fsck.conf.svn-base new file mode 100644 index 0000000..9c96b49 --- /dev/null +++ b/package/system/utils/e2fsprogs/files/.svn/text-base/e2fsck.conf.svn-base @@ -0,0 +1,3 @@ +[options] +broken_system_clock = true + 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" diff --git a/package/system/utils/e2fsprogs/files/e2fsck.conf b/package/system/utils/e2fsprogs/files/e2fsck.conf new file mode 100644 index 0000000..9c96b49 --- /dev/null +++ b/package/system/utils/e2fsprogs/files/e2fsck.conf @@ -0,0 +1,3 @@ +[options] +broken_system_clock = true + diff --git a/package/system/utils/e2fsprogs/files/e2fsck.sh b/package/system/utils/e2fsprogs/files/e2fsck.sh new file mode 100644 index 0000000..22031ed --- /dev/null +++ b/package/system/utils/e2fsprogs/files/e2fsck.sh @@ -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" |