From b15a82d2a97a6041fd7a4ada672d56bb982860be Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Sat, 29 Aug 2009 19:47:13 -0400 Subject: move checkyesno to globals, make NETCFG_DEBUG a yes/no setting (default=no) Signed-off-by: Jim Pryor --- contrib/logging.hook | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'contrib') diff --git a/contrib/logging.hook b/contrib/logging.hook index 8a9f75f..bf6b787 100755 --- a/contrib/logging.hook +++ b/contrib/logging.hook @@ -36,7 +36,7 @@ function report_err { function report_warn { report_log warning "$*" # printhl "$*" - [[ -n "$NETCFG_DEBUG" ]] && echo "DEBUG: $*" >&2 + checkyesno "$NETCFG_DEBUG" && echo "DEBUG: $*" >&2 } @@ -44,11 +44,11 @@ function report_warn { function report_notify { report_log notice "$*" # print "$*" >&2 - [[ -n "$NETCFG_DEBUG" ]] && echo "DEBUG: $*" >&2 + checkyesno "$NETCFG_DEBUG" && echo "DEBUG: $*" >&2 } function report_debug { - if [[ -n "$NETCFG_DEBUG" ]]; then + if checkyesno "$NETCFG_DEBUG"; then echo "DEBUG: $*" >&2 else report_log debug "$*" -- cgit v1.2.3-24-g4f1b