[arch-projects] [initscripts][PATCH] functions: re-add status -v as a NOOP

Dave Reisner dreisner at archlinux.org
Fri Jul 20 21:59:31 EDT 2012


Since this is technically public API, the -v flag shouldn't be removed
so easily. Re-add it, but make it a NOOP to support existing uses of it.

Signed-off-by: Dave Reisner <dreisner at archlinux.org>
---
 functions | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/functions b/functions
index b231eca..19159e6 100644
--- a/functions
+++ b/functions
@@ -171,7 +171,16 @@ stat_die() {
 }
 
 status() {
-	[[ $1 = '-q' ]] && { local quiet=1; shift; }
+	local quiet
+	case $1 in
+		-q)
+			quiet=1
+			;;&
+		-v)
+			# NOOP: supported for backwards compat
+			shift
+			;;
+	esac
 	stat_busy "$1"
 	shift
 	if (( quiet )); then
-- 
1.7.11.2



More information about the arch-projects mailing list