From 5596b70bd0e6276861842390829f362c1edf4a2d Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 24 Sep 2012 13:04:32 +0200 Subject: [PATCH] dracut-logger.sh: don't check for *lvl==0 in dlog_init() --- dracut-logger.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 2.47.3