From 52299efc246f6f83aac76b39330845aa93742542 Mon Sep 17 00:00:00 2001 From: "Kurt J. Bosch" Date: Mon, 27 Jun 2011 16:17:59 +0200 Subject: Fix '>|' not used allways when redirecting to files This avoids errors if one should set the noclobber shell option somewhere (within a daemon script or some custom function). We already had this, but it seems gone lost mostly. --- functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'functions') diff --git a/functions b/functions index ef014e3..c6416d9 100644 --- a/functions +++ b/functions @@ -178,7 +178,7 @@ in_array() { add_daemon() { [[ -d /run/daemons ]] || /bin/mkdir -p /run/daemons - > /run/daemons/"$1" + >| /run/daemons/"$1" } rm_daemon() { @@ -376,7 +376,7 @@ fsck_all() { FORCEFSCK= [[ -f /forcefsck ]] || in_array forcefsck $(< /proc/cmdline) && FORCEFSCK="-- -f" run_hook sysinit_prefsck - 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 >|$FSCK_OUT 2>|$FSCK_ERR local fsckret=$? if (( fsckret > 1 )); then stat_fail -- cgit v1.2.3