aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-07-17 19:17:46 (GMT)
committerTom Gundersen <teg@jklm.no>2012-07-17 19:17:46 (GMT)
commit072a18662e7eb082eebfc24e8ad6b7c32439afe4 (patch)
tree1a3e999696711eb890c57bf57f53f301903f5e7d
parente9b4330e9410f43dfe8b95b892b735175774f113 (diff)
downloadinitscripts-072a18662e7eb082eebfc24e8ad6b7c32439afe4.tar.xz
status: be verbose by default
Add a new option '-q' which allows status() to be shut up, should it be needed. Signed-off-by: Tom Gundersen <teg@jklm.no>
-rw-r--r--functions12
1 files changed, 6 insertions, 6 deletions
diff --git a/functions b/functions
index d7b2026..934cb75 100644
--- a/functions
+++ b/functions
@@ -171,13 +171,13 @@ stat_die() {
}
status() {
- [[ $1 = '-v' ]] && { local v=1; shift; }
+ [[ $1 = '-q' ]] && { local quiet=1; shift; }
stat_busy "$1"
shift
- if (( v )); then
- "$@"
- else
+ if (( quiet )); then
"$@" &>/dev/null
+ else
+ "$@"
fi
local ret=$?
(( ret == 0 )) && stat_done || stat_fail
@@ -373,7 +373,7 @@ udevd_modprobe() {
stat_done
# Load modules from the MODULES array and modules-load.d
- status -v "Loading user-specified modules" load_modules
+ status "Loading user-specified modules" load_modules
status "Waiting for udev uevents to be processed" \
udevadm settle
@@ -645,7 +645,7 @@ umount_all() {
}
remove_leftover() {
- status -v 'Removing leftover files' systemd-tmpfiles --create --remove --clean
+ status 'Removing leftover files' systemd-tmpfiles --create --remove --clean
}
bootlogd_stop() {