summaryrefslogtreecommitdiffstats
path: root/contrib/logging.hook
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-04-11 02:07:20 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-04-11 11:40:18 +0200
commit7fab9eaf848004fd742e0513d620ced9ee7667a2 (patch)
tree2470a3a6643e5ae2cf3d89c50998b92cfffc86db /contrib/logging.hook
parentfda34d4a6c03e919786b26876d6a9c051119db1d (diff)
downloadnetctl-7fab9eaf848004fd742e0513d620ced9ee7667a2.tar.gz
netctl-7fab9eaf848004fd742e0513d620ced9ee7667a2.tar.xz
Rewrite output hook to not depend on initscripts
/etc/rc.d/functions is owned by initscripts on which netcfg does not explicitly depend. The revised layout is inspired by systemd.
Diffstat (limited to 'contrib/logging.hook')
-rwxr-xr-xcontrib/logging.hook13
1 files changed, 4 insertions, 9 deletions
diff --git a/contrib/logging.hook b/contrib/logging.hook
index b7af62e..82d0ed1 100755
--- a/contrib/logging.hook
+++ b/contrib/logging.hook
@@ -33,20 +33,14 @@ function report_err {
printhl "$*"
}
-function report_warn {
- report_log warning "$*"
- # printhl "$*"
- checkyesno "$NETCFG_DEBUG" && echo "DEBUG: $*" >&2
-}
-
-
-function report_notify {
+function report_notice {
report_log notice "$*"
# print "$*" >&2
checkyesno "$NETCFG_DEBUG" && echo "DEBUG: $*" >&2
}
+
function report_debug {
if checkyesno "$NETCFG_DEBUG"; then
echo "DEBUG: $*" >&2
@@ -56,13 +50,13 @@ function report_debug {
}
-
function report_try {
report_log notice "trying $*..."
stat_busy "$*"
REPORT_TRYING=1
}
+
function report_fail {
if [[ -n "$*" ]]; then
report_log err "$*"
@@ -79,6 +73,7 @@ function report_fail {
fi
}
+
function report_success {
if [[ -n "$*" ]]; then
stat_append "- $*"