diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-09-18 20:37:13 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-09-18 20:37:13 +0000 |
commit | 0bdc86fd73fe6f64fde9379abe18ea714d8a52a1 (patch) | |
tree | 193d08e3defc6e8d1c31fa4879a62de41b6a9807 /usr.sbin/ntpd/ntpd.c | |
parent | 0dbb3656008c5e3132e89e302e6f38c5b5cdbb4d (diff) |
implement -S to override earlier -s, requested by theo
Diffstat (limited to 'usr.sbin/ntpd/ntpd.c')
-rw-r--r-- | usr.sbin/ntpd/ntpd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/ntpd/ntpd.c b/usr.sbin/ntpd/ntpd.c index 0a7ab12c295..6a0ddb8204e 100644 --- a/usr.sbin/ntpd/ntpd.c +++ b/usr.sbin/ntpd/ntpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntpd.c,v 1.19 2004/09/18 20:27:57 henning Exp $ */ +/* $OpenBSD: ntpd.c,v 1.20 2004/09/18 20:37:12 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -68,7 +68,7 @@ usage(void) { extern char *__progname; - fprintf(stderr, "usage: %s [-d] [-f file] [-s]\n", __progname); + fprintf(stderr, "usage: %s [-dsS] [-f file]\n", __progname); exit(1); } @@ -91,7 +91,7 @@ main(int argc, char *argv[]) log_init(1); /* log to stderr until daemonized */ - while ((ch = getopt(argc, argv, "df:s")) != -1) { + while ((ch = getopt(argc, argv, "df:sS")) != -1) { switch (ch) { case 'd': conf.debug = 1; @@ -102,6 +102,9 @@ main(int argc, char *argv[]) case 's': conf.settime = 1; break; + case 'S': + conf.settime = 0; + break; default: usage(); /* NOTREACHED */ |