$FSCK_OUT/$FSCK_ERR might not be set when: * unset in some custom sysinit_prefsck hook * calling fsck() from a shutdown hook --- functions | 2 +- rc.sysinit | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/functions b/functions index fd18694..202db30 100644 --- a/functions +++ b/functions @@ -365,7 +365,7 @@ NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuse # Check local filesystems fsck_all() { - fsck -A -T -C$FSCK_FD -a -t "$NETFS,noopts=_netdev" $FORCEFSCK >|$FSCK_OUT 2>|$FSCK_ERR + fsck -A -T -C$FSCK_FD -a -t "$NETFS,noopts=_netdev" $FORCEFSCK return $? } diff --git a/rc.sysinit b/rc.sysinit index f64c9ad..5814007 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -174,8 +174,8 @@ if [[ -f /etc/crypttab && $CS ]] && grep -q ^[^#] /etc/crypttab; then fi # Check filesystems -FSCK_OUT=/dev/stdout -FSCK_ERR=/dev/stdout +FSCK_OUT= +FSCK_ERR= FSCK_FD= FORCEFSCK= [[ -f /forcefsck ]] || is_in_array forcefsck $(< /proc/cmdline) && FORCEFSCK="-- -f" @@ -183,7 +183,7 @@ declare -r FORCEFSCK run_hook sysinit_prefsck if [[ -x $(type -P fsck) ]]; then stat_busy "Checking Filesystems" - fsck_all + fsck_all >|${FSCK_OUT:-/dev/stdout} 2>|${FSCK_ERR:-/dev/stdout} declare -r fsckret=$? (( fsckret <= 1 )) && stat_done || stat_fail else -- 1.7.1