diff options
author | David Lamparter <equinox@diac24.net> | 2009-10-15 13:48:17 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2010-02-04 02:53:48 +0100 |
commit | 771d0b2c006702b739e707bc3967679bbb68389e (patch) | |
tree | fb8368af8256a8e1deaeac2be27030234d8ef58a /ripngd | |
parent | db0516ace09969cba08f5a6aaddf97b29b5ecb78 (diff) | |
download | quagga-771d0b2c006702b739e707bc3967679bbb68389e.tar.bz2 quagga-771d0b2c006702b739e707bc3967679bbb68389e.tar.xz |
lib: fs namespacing 4/5: add -N command-line parameter
this adds a -N option to all daemons which specifies the namespace name
to include in all paths through path_set_namespace
Diffstat (limited to 'ripngd')
-rw-r--r-- | ripngd/ripng_main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c index 54e3b69d..62477b6f 100644 --- a/ripngd/ripng_main.c +++ b/ripngd/ripng_main.c @@ -34,6 +34,7 @@ #include "if.h" #include "privs.h" #include "sigevent.h" +#include "paths.h" #include "ripngd/ripngd.h" @@ -45,6 +46,7 @@ char *config_file = NULL; struct option longopts[] = { { "daemon", no_argument, NULL, 'd'}, + { "namespace", required_argument, NULL, 'N'}, { "config_file", required_argument, NULL, 'f'}, { "pid_file", required_argument, NULL, 'i'}, { "dryrun", no_argument, NULL, 'C'}, @@ -113,6 +115,7 @@ usage (char *progname, int status) printf ("Usage : %s [OPTION...]\n\ Daemon which manages RIPng.\n\n\ -d, --daemon Runs in daemon mode\n\ +-N, --namespace Insert argument into all paths\n\ -f, --config_file Set configuration file name\n\ -i, --pid_file Set process identifier file name\n\ -A, --vty_addr Set vty's bind address\n\ @@ -208,7 +211,7 @@ main (int argc, char **argv) { int opt; - opt = getopt_long (argc, argv, "df:i:hA:P:u:g:vC", longopts, 0); + opt = getopt_long (argc, argv, "dN:f:i:hA:P:u:g:vC", longopts, 0); if (opt == EOF) break; @@ -220,6 +223,9 @@ main (int argc, char **argv) case 'd': daemon_mode = 1; break; + case 'N': + path_set_namespace (optarg); + break; case 'f': config_file = optarg; break; |