Blame 0091-dracut-logger-re-set-debugging.patch

Harald Hoyer 8a8033
From 44cef0d5637f5f6982612d22c92f6d299ec316f9 Mon Sep 17 00:00:00 2001
Harald Hoyer 8a8033
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 8a8033
Date: Thu, 20 Oct 2011 13:04:10 +0200
Harald Hoyer 8a8033
Subject: [PATCH] dracut-logger: re-set debugging
Harald Hoyer 8a8033
Harald Hoyer 8a8033
---
Harald Hoyer 8a8033
 dracut-logger |    8 +++++++-
Harald Hoyer 8a8033
 1 files changed, 7 insertions(+), 1 deletions(-)
Harald Hoyer 8a8033
Harald Hoyer 8a8033
diff --git a/dracut-logger b/dracut-logger
Harald Hoyer 8a8033
index ce28208..f1b3a7e 100755
Harald Hoyer 8a8033
--- a/dracut-logger
Harald Hoyer 8a8033
+++ b/dracut-logger
Harald Hoyer 8a8033
@@ -313,7 +313,6 @@ dlog() {
Harald Hoyer 8a8033
             _do_dlog "$1" "$line"
Harald Hoyer 8a8033
         done
Harald Hoyer 8a8033
     fi
Harald Hoyer 8a8033
-    [ -n "$debug" ] && set -x || :
Harald Hoyer 8a8033
 }
Harald Hoyer 8a8033
 
Harald Hoyer 8a8033
 ## @brief Logs message at TRACE level (6)
Harald Hoyer 8a8033
@@ -323,6 +322,7 @@ dlog() {
Harald Hoyer 8a8033
 dtrace() {
Harald Hoyer 8a8033
     set +x
Harald Hoyer 8a8033
     dlog 6 "$@"
Harald Hoyer 8a8033
+    [ -n "$debug" ] && set -x || :
Harald Hoyer 8a8033
 }
Harald Hoyer 8a8033
 
Harald Hoyer 8a8033
 ## @brief Logs message at DEBUG level (5)
Harald Hoyer 8a8033
@@ -332,6 +332,7 @@ dtrace() {
Harald Hoyer 8a8033
 ddebug() {
Harald Hoyer 8a8033
     set +x
Harald Hoyer 8a8033
     dlog 5 "$@"
Harald Hoyer 8a8033
+    [ -n "$debug" ] && set -x || :
Harald Hoyer 8a8033
 }
Harald Hoyer 8a8033
 
Harald Hoyer 8a8033
 ## @brief Logs message at INFO level (4)
Harald Hoyer 8a8033
@@ -341,6 +342,7 @@ ddebug() {
Harald Hoyer 8a8033
 dinfo() {
Harald Hoyer 8a8033
     set +x
Harald Hoyer 8a8033
     dlog 4 "$@"
Harald Hoyer 8a8033
+    [ -n "$debug" ] && set -x || :
Harald Hoyer 8a8033
 }
Harald Hoyer 8a8033
 
Harald Hoyer 8a8033
 ## @brief Logs message at WARN level (3)
Harald Hoyer 8a8033
@@ -350,6 +352,7 @@ dinfo() {
Harald Hoyer 8a8033
 dwarn() {
Harald Hoyer 8a8033
     set +x
Harald Hoyer 8a8033
     dlog 3 "$@"
Harald Hoyer 8a8033
+    [ -n "$debug" ] && set -x || :
Harald Hoyer 8a8033
 }
Harald Hoyer 8a8033
 
Harald Hoyer 8a8033
 ## @brief It's an alias to dwarn() function.
Harald Hoyer 8a8033
@@ -359,6 +362,7 @@ dwarn() {
Harald Hoyer 8a8033
 dwarning() {
Harald Hoyer 8a8033
     set +x
Harald Hoyer 8a8033
     dwarn "$@"
Harald Hoyer 8a8033
+    [ -n "$debug" ] && set -x || :
Harald Hoyer 8a8033
 }
Harald Hoyer 8a8033
 
Harald Hoyer 8a8033
 ## @brief Logs message at ERROR level (2)
Harald Hoyer 8a8033
@@ -368,6 +372,7 @@ dwarning() {
Harald Hoyer 8a8033
 derror() {
Harald Hoyer 8a8033
     set +x
Harald Hoyer 8a8033
     dlog 2 "$@"
Harald Hoyer 8a8033
+    [ -n "$debug" ] && set -x || :
Harald Hoyer 8a8033
 }
Harald Hoyer 8a8033
 
Harald Hoyer 8a8033
 ## @brief Logs message at FATAL level (1)
Harald Hoyer 8a8033
@@ -377,4 +382,5 @@ derror() {
Harald Hoyer 8a8033
 dfatal() {
Harald Hoyer 8a8033
     set +x
Harald Hoyer 8a8033
     dlog 1 "$@"
Harald Hoyer 8a8033
+    [ -n "$debug" ] && set -x || :
Harald Hoyer 8a8033
 }