From: Harald Hoyer Date: Mon, 24 Sep 2012 11:04:32 +0000 (+0200) Subject: dracut-logger.sh: don't check for *lvl==0 in dlog_init() X-Git-Tag: 024~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5596b70bd0e6276861842390829f362c1edf4a2d;p=thirdparty%2Fdracut.git dracut-logger.sh: don't check for *lvl==0 in dlog_init() --- diff --git a/dracut-logger.sh b/dracut-logger.sh index dbe26eed5..2ffd9fb16 100755 --- a/dracut-logger.sh +++ b/dracut-logger.sh @@ -116,7 +116,7 @@ dlog_init() { if [ -z "$fileloglvl" ]; then [ -w "$logfile" ] && fileloglvl=4 || fileloglvl=0 - elif (( $fileloglvl >= 0 )); then + elif (( $fileloglvl > 0 )); then __oldumask=$(umask) umask 0377 ! [ -e "$logfile" ] && >"$logfile" @@ -138,7 +138,7 @@ dlog_init() { fi fi - if (( $sysloglvl >= 0 )); then + if (( $sysloglvl > 0 )); then if ! [ -S /dev/log -a -w /dev/log ] || ! command -v logger >/dev/null then # We cannot log to syslog, so turn this facility off. @@ -148,7 +148,7 @@ dlog_init() { fi fi - if (($sysloglvl >= 0)) || (($kmsgloglvl >= 0 )); then + if (($sysloglvl > 0)) || (($kmsgloglvl > 0 )); then if [ -n "$dracutbasedir" ]; then readonly syslogfacility=user else