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 /zebra/main.c | |
| 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 'zebra/main.c')
| -rw-r--r-- | zebra/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/zebra/main.c b/zebra/main.c index 293e22b8..b58fed12 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -69,6 +69,7 @@ struct option longopts[] = { { "batch", no_argument, NULL, 'b'}, { "daemon", no_argument, NULL, 'd'}, + { "namespace", required_argument, NULL, 'N'}, { "keep_kernel", no_argument, NULL, 'k'}, { "config_file", required_argument, NULL, 'f'}, { "pid_file", required_argument, NULL, 'i'}, @@ -130,6 +131,7 @@ usage (char *progname, int status) "redistribution between different routing protocols.\n\n"\ "-b, --batch Runs in batch mode\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"\ "-k, --keep_kernel Don't delete old routes which installed by "\ @@ -233,9 +235,9 @@ main (int argc, char **argv) int opt; #ifdef HAVE_NETLINK - opt = getopt_long (argc, argv, "bdkf:i:hA:P:ru:g:vs:C", longopts, 0); + opt = getopt_long (argc, argv, "bdN:kf:i:hA:P:ru:g:vs:C", longopts, 0); #else - opt = getopt_long (argc, argv, "bdkf:i:hA:P:ru:g:vC", longopts, 0); + opt = getopt_long (argc, argv, "bdN:kf:i:hA:P:ru:g:vC", longopts, 0); #endif /* HAVE_NETLINK */ if (opt == EOF) @@ -250,6 +252,9 @@ main (int argc, char **argv) case 'd': daemon_mode = 1; break; + case 'N': + path_set_namespace (optarg); + break; case 'k': keep_kernel_mode = 1; break; |
