diff options
author | Tobias Brunner <tobias@strongswan.org> | 2012-09-12 17:11:54 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-09-12 17:15:14 +0200 |
commit | dc80ef0cde1db8a3ceb39230f8468c34f3b6961f (patch) | |
tree | 2e0aba7da621a43608b81d80bca86471c4c99a15 | |
parent | 629cdca82cbbec1474c533f7a936a9bab446608c (diff) | |
download | strongswan-dc80ef0cde1db8a3ceb39230f8468c34f3b6961f.tar.bz2 strongswan-dc80ef0cde1db8a3ceb39230f8468c34f3b6961f.tar.xz |
starter: Added --nolog option to suppress logging in starter itself
Fixes #224.
-rw-r--r-- | src/starter/starter.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/starter/starter.c b/src/starter/starter.c index 166be3e45..c6efcb2f4 100644 --- a/src/starter/starter.c +++ b/src/starter/starter.c @@ -327,8 +327,8 @@ static bool check_pid(char *pid_file) static void usage(char *name) { - fprintf(stderr, "Usage: starter [--nofork] [--auto-update <sec>] " - "[--debug|--debug-more|--debug-all]\n"); + fprintf(stderr, "Usage: starter [--nofork] [--auto-update <sec>]\n" + " [--debug|--debug-more|--debug-all|--nolog]\n"); exit(LSB_RC_INVALID_ARGUMENT); } @@ -372,6 +372,10 @@ int main (int argc, char **argv) { current_loglevel = 4; } + else if (streq(argv[i], "--nolog")) + { + current_loglevel = 0; + } else if (streq(argv[i], "--nofork")) { no_fork = TRUE; |