From 072a18662e7eb082eebfc24e8ad6b7c32439afe4 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 17 Jul 2012 21:17:46 +0200 Subject: 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 --- functions | 12 ++++++------ 1 file 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() { -- cgit v1.2.3