From aa9f0e5da7d12aaa3ae5be50b75e4b02a1efcf01 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Thu, 24 Jul 2008 19:04:57 +0000 Subject: [PATCH] I'm getting commit happy...forgot to check for the flags in the switch statement git-svn-id: https://svn.alkaloid.net/gpl/ldap2dns/trunk@462 06cd67b6-e706-0410-b29e-9de616bca6e9 --- ldap2dns.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ldap2dns.c b/ldap2dns.c index 304ced1..8466890 100644 --- a/ldap2dns.c +++ b/ldap2dns.c @@ -180,13 +180,12 @@ static void print_usage(void) printf(" -h host\tHostname of LDAP server, defaults to localhost\n"); printf(" -p port\tPort number to connect to LDAP server, defaults to %d\n", LDAP_PORT); printf(" -H hostURI\tURI (ldap://hostname or ldaps://hostname of LDAP server\n"); - printf(" -u numsecs\tUpdate DNS data after numsecs. Defaults to %d. Daemon mode only\n\t\t", UPDATE_INTERVAL); - printf("\n"); + printf(" -u numsecs\tUpdate DNS data after numsecs. Defaults to %d. Daemon mode only\n", UPDATE_INTERVAL); printf(" -e \"exec-cmd\"\tCommand to execute after data is generated\n"); printf(" -d\t\tRun as a daemon (same as if invoked as ldap2dnsd)\n"); printf(" -f\t\tIf running as a daemon stay in the foreground (do not fork)\n"); printf(" -v\t\trun in verbose mode, repeat for more verbosity\n"); - printf(" -V\t\tprint version and exit\n\n"); + printf(" -V\t\tprint version and exit\n"); printf("\n"); printf("Note: Zone data are only updated after zone serials increment.\n"); } @@ -461,6 +460,12 @@ static int parse_options() if (sscanf(optarg, "%d", &options.reclimit)!=1) options.reclimit = DEF_RECLIMIT; break; + case 'd': + options.is_daemon = 1; + break; + case 'f': + options.foreground = 1; + break; case '?': default: print_usage();