summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-08-11 18:49:03 +0200
committerJames Rayner <james@archlinux.org>2009-09-07 11:46:17 +0200
commit3e6d122b2fba58080d3aa3e94d766084d3d42f91 (patch)
tree63b888e5c6b20eb334b615441848dd619ebd2e19
parent47e89de7b8cbb9b26f1e4471702c9def3063f940 (diff)
downloadnetctl-3e6d122b2fba58080d3aa3e94d766084d3d42f91.tar.gz
netctl-3e6d122b2fba58080d3aa3e94d766084d3d42f91.tar.xz
i/o tweaks
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
-rwxr-xr-xcontrib/logging.hook1
-rw-r--r--src/globals13
-rw-r--r--src/hooks/arch1
3 files changed, 10 insertions, 5 deletions
diff --git a/contrib/logging.hook b/contrib/logging.hook
index b314dd1..8a9f75f 100755
--- a/contrib/logging.hook
+++ b/contrib/logging.hook
@@ -82,6 +82,7 @@ function report_fail {
function report_success {
if [[ -n "$*" ]]; then
stat_append "- $*"
+ REPORT_TRYING=
fi
report_log notice "${*:-succeeded}"
stat_done
diff --git a/src/globals b/src/globals
index 318c9d9..c55d038 100644
--- a/src/globals
+++ b/src/globals
@@ -1,5 +1,4 @@
-
-# /etc/network.d/hooks directory
+# /usr/lin/networks/globals
#
# any +x files in /usr/lib/network/hooks and /etc/network.d/hooks
# will be sourced when this file is.
@@ -48,14 +47,16 @@ function report_debug {
}
function report_try {
- echo ":: $*"
+ # JP: this needs -n option
+ echo -n ":: $*"
REPORT_TRYING=1
}
function report_fail {
if [[ -n "$*" ]]; then
if [[ -n "$REPORT_TRYING" ]]; then
- echo "- $*"
+ # JP: this needs -n option
+ echo -n "- $*"
REPORT_TRYING=
echo "[fail]"
else
@@ -69,7 +70,9 @@ function report_fail {
function report_success {
if [[ -n "$*" ]]; then
- echo "- $*"
+ # JP: this needs -n option
+ echo -n "- $*"
+ REPORT_TRYING=
fi
echo "[done]"
}
diff --git a/src/hooks/arch b/src/hooks/arch
index 6bf6a41..5dc7168 100644
--- a/src/hooks/arch
+++ b/src/hooks/arch
@@ -34,6 +34,7 @@ function report_fail {
function report_success {
if [[ -n "$*" ]]; then
stat_append "- $*"
+ REPORT_TRYING=
fi
stat_done
}