aboutsummaryrefslogtreecommitdiffstats
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
commitf8d838af0e070de3ad5fd099f541b5bff203ddcf (patch)
treee3d77fa151e3911759ae4c7fa63e55d40ac7312e /package/e2fsprogs/files
parente0f45e43ae4ca0d44cfd679b003961f4c5ca6541 (diff)
downloadupstream-f8d838af0e070de3ad5fd099f541b5bff203ddcf.tar.gz
upstream-f8d838af0e070de3ad5fd099f541b5bff203ddcf.tar.bz2
upstream-f8d838af0e070de3ad5fd099f541b5bff203ddcf.zip
[package] e2fsprogs: fix status reaping with fsck piped to logger, based on patch by Lukasz Golec-Biernat <mojedokumenty+openwrt@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31377 3c298f89-4303-0410-b956-a3cf2f4a3e73
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 3b34239ce7..22031edb67 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;;