summaryrefslogtreecommitdiff
path: root/package/e2fsprogs/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-04-20 15:18:17 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-04-20 15:18:17 +0000
commit2d19ca6925f229e7e1dc8398baf3a702a05ed56f (patch)
treee269e808d3a442e86f45139e42bbcee1e268fae4 /package/e2fsprogs/files
parent3c4165a305715c9980c8e4f5348edd7984fed62a (diff)
downloadmtk-20170518-2d19ca6925f229e7e1dc8398baf3a702a05ed56f.zip
mtk-20170518-2d19ca6925f229e7e1dc8398baf3a702a05ed56f.tar.gz
mtk-20170518-2d19ca6925f229e7e1dc8398baf3a702a05ed56f.tar.bz2
e2fsprogs: fix status reaping with fsck piped to logger, based on patch by Lukasz Golec-Biernat <mojedokumenty+openwrt@gmail.com>
SVN-Revision: 31377
Diffstat (limited to 'package/e2fsprogs/files')
-rw-r--r--package/e2fsprogs/files/e2fsck.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/e2fsprogs/files/e2fsck.sh b/package/e2fsprogs/files/e2fsck.sh
index 3b34239..22031ed 100644
--- a/package/e2fsprogs/files/e2fsck.sh
+++ b/package/e2fsprogs/files/e2fsck.sh
@@ -1,12 +1,15 @@
#!/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;;