aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc-update.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc/rc-update.c')
-rw-r--r--src/rc/rc-update.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rc/rc-update.c b/src/rc/rc-update.c
index 64e24000..5a0264cd 100644
--- a/src/rc/rc-update.c
+++ b/src/rc/rc-update.c
@@ -4,7 +4,7 @@
*/
/*
- * Copyright 2007-2008 Roy Marples <roy@marples.name>
+ * Copyright 2007-2009 Roy Marples <roy@marples.name>
* All rights reserved
* Redistribution and use in source and binary forms, with or without
@@ -138,11 +138,13 @@ show(RC_STRINGLIST *runlevels, bool verbose)
"Usage: rc-update [options] add service <runlevel>\n" \
" rc-update [options] del service <runlevel>\n" \
" rc-update [options] show"
-#define getoptstring getoptstring_COMMON
+#define getoptstring "u" getoptstring_COMMON
static const struct option longopts[] = {
+ { "update", 0, NULL, 'u' },
longopts_COMMON
};
static const char * const longopts_help[] = {
+ "Force an update of the dependency tree",
longopts_help_COMMON
};
#include "_usage.c"
@@ -167,8 +169,11 @@ rc_update(int argc, char **argv)
int ret;
while ((opt = getopt_long(argc, argv, getoptstring,
- longopts, (int *) 0)) != -1)
+ longopts, (int *)0)) != -1)
switch (opt) {
+ case 'u':
+ _rc_deptree_load(-1, &ret);
+ return ret;
case_RC_COMMON_GETOPT
}