diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2017-07-05 11:11:57 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2017-07-05 11:11:57 +0000 |
commit | e6c268547237f84264c5ba13ba69fcdfa2accd03 (patch) | |
tree | 82bed8dffd30f2391712f050d83648bb93ac9538 /usr.sbin | |
parent | 6de284923570391fcbeeca27d2bfa3c9e08c3ac4 (diff) |
Don't stop logging to stderr when running in foreground with -d.
Pointed out by Kapetanakis Giannis
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/dhcrelay/dhcrelay.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/dhcrelay/dhcrelay.c b/usr.sbin/dhcrelay/dhcrelay.c index 161d289ad1d..7ae9b1e80be 100644 --- a/usr.sbin/dhcrelay/dhcrelay.c +++ b/usr.sbin/dhcrelay/dhcrelay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcrelay.c,v 1.62 2017/04/04 15:50:29 reyk Exp $ */ +/* $OpenBSD: dhcrelay.c,v 1.63 2017/07/05 11:11:56 reyk Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org> @@ -106,7 +106,6 @@ main(int argc, char *argv[]) daemonize = 1; log_init(1, LOG_DAEMON); /* log to stderr until daemonized */ - log_setverbose(1); setup_iflist(); @@ -309,9 +308,9 @@ main(int argc, char *argv[]) if (daemonize) { if (rdaemon(devnull) == -1) fatal("rdaemon"); + + log_init(0, LOG_DAEMON); /* stop logging to stderr */ } - log_init(0, LOG_DAEMON); /* stop loggoing to stderr */ - log_setverbose(0); if (pledge("stdio route", NULL) == -1) fatalx("pledge"); |