summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-08-30 01:47:13 +0200
committerJames Rayner <james@archlinux.org>2009-09-07 12:14:08 +0200
commitb15a82d2a97a6041fd7a4ada672d56bb982860be (patch)
tree03057cb867ec9b76d7bf1b38d0bbbc218f8d9294 /contrib
parent9ddad8ae8d3f093db4474165a9e2d46d8dc08767 (diff)
downloadnetctl-b15a82d2a97a6041fd7a4ada672d56bb982860be.tar.gz
netctl-b15a82d2a97a6041fd7a4ada672d56bb982860be.tar.xz
move checkyesno to globals, make NETCFG_DEBUG a yes/no setting (default=no)
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/logging.hook6
1 files changed, 3 insertions, 3 deletions
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 "$*"