From: Tobias Brunner Date: Wed, 12 Sep 2012 15:11:54 +0000 (+0200) Subject: starter: Added --nolog option to suppress logging in starter itself X-Git-Tag: 5.0.1~106 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc80ef0cde1db8a3ceb39230f8468c34f3b6961f;p=thirdparty%2Fstrongswan.git starter: Added --nolog option to suppress logging in starter itself Fixes #224. --- diff --git a/src/starter/starter.c b/src/starter/starter.c index 166be3e456..c6efcb2f49 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 ] " - "[--debug|--debug-more|--debug-all]\n"); + fprintf(stderr, "Usage: starter [--nofork] [--auto-update ]\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;