]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-logger.sh: don't check for *lvl==0 in dlog_init()
authorHarald Hoyer <harald@redhat.com>
Mon, 24 Sep 2012 11:04:32 +0000 (13:04 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 24 Sep 2012 11:05:44 +0000 (13:05 +0200)
dracut-logger.sh

index dbe26eed5593f9b25c510c84e802670f09aeeb0c..2ffd9fb166f19cd36cdfb49fde76d193b96aaa09 100755 (executable)
@@ -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