e2fsprogs: fix status reaping with fsck piped to logger, based on patch by Lukasz Golec-Biernat <mojedokumenty+openwrt@gmail.com>

SVN-Revision: 31377
This commit is contained in:
Jo-Philipp Wich 2012-04-20 15:18:17 +00:00
parent 3c4165a305
commit 2d19ca6925
2 changed files with 4 additions and 1 deletions

View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=e2fsprogs PKG_NAME:=e2fsprogs
PKG_VERSION:=1.42 PKG_VERSION:=1.42
PKG_MD5SUM:=a3c4ffd7352310ab5e9412965d575610 PKG_MD5SUM:=a3c4ffd7352310ab5e9412965d575610
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/e2fsprogs PKG_SOURCE_URL:=@SF/e2fsprogs

View File

@ -1,12 +1,15 @@
#!/bin/sh #!/bin/sh
# Copyright 2010 Vertical Communications # Copyright 2010 Vertical Communications
# Copyright 2012 OpenWrt.org
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
# #
fsck_e2fsck() { fsck_e2fsck() {
set -o pipefail
e2fsck -p "$device" 2>&1 | logger -t "fstab: e2fsck ($device)" e2fsck -p "$device" 2>&1 | logger -t "fstab: e2fsck ($device)"
local status="$?" local status="$?"
set +o pipefail
case "$status" in case "$status" in
0|1) ;; #success 0|1) ;; #success
2) reboot;; 2) reboot;;