aboutsummaryrefslogtreecommitdiff
path: root/src/rc-update.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-25 23:17:25 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-25 23:17:25 +0000
commitab0edd43b9c6df2946e8a514b12e04db23f13c65 (patch)
tree8a8d9658c9d0671fb55df28f9f00f323473b8417 /src/rc-update.c
parent7d9acd968f7a0537b258f23edaca2c85a0774b47 (diff)
unify verbose/quiet handling
Diffstat (limited to 'src/rc-update.c')
-rw-r--r--src/rc-update.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/rc-update.c b/src/rc-update.c
index e0dc0867..b6c992f6 100644
--- a/src/rc-update.c
+++ b/src/rc-update.c
@@ -110,12 +110,11 @@ static void show (char **runlevels, bool verbose)
}
#include "_usage.h"
-#define getoptstring "adsv" getoptstring_COMMON
+#define getoptstring "ads" getoptstring_COMMON
static struct option longopts[] = {
{ "add", 0, NULL, 'a'},
{ "delete", 0, NULL, 'd'},
{ "show", 0, NULL, 's'},
- { "verbose", 0, NULL, 'v'},
longopts_COMMON
{ NULL, 0, NULL, 0}
};
@@ -123,7 +122,6 @@ static const char * const longopts_help[] = {
"Add the init.d to runlevels",
"Delete init.d from runlevels",
"Show init.d's in runlevels",
- "Be verbose!",
longopts_help_COMMON
};
#include "_usage.c"
@@ -158,14 +156,13 @@ int rc_update (int argc, char **argv)
case 's':
action |= DOSHOW;
break;
- case 'v':
- verbose = true;
- break;
- case_RC_COMMON_GETOPT
+ case_RC_COMMON_GETOPT
}
}
+ verbose = rc_is_env ("RC_VERBOSE", "yes");
+
if ((action & DOSHOW && action != DOSHOW) ||
(action & DOADD && action != DOADD) ||
(action & DODELETE && action != DODELETE))