summaryrefslogtreecommitdiff
path: root/usr.sbin/ripd
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2011-08-20 19:02:29 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2011-08-20 19:02:29 +0000
commitabb7f3e568a613a7d6daf6af3556386e08bfee52 (patch)
treee138e84c6cdd55dfd8570964868e01deff349f80 /usr.sbin/ripd
parent564f667f41c7007f68568b2bbaabd0b6204a0055 (diff)
Decouple log_verbose() from log_init() so the verbose flag stays set with
"-v" (previously only "-vd" worked). Similar to recent ospfd commit. ok claudio@
Diffstat (limited to 'usr.sbin/ripd')
-rw-r--r--usr.sbin/ripd/log.c3
-rw-r--r--usr.sbin/ripd/ripd.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ripd/log.c b/usr.sbin/ripd/log.c
index c66b67838a5..a0ae314d6f7 100644
--- a/usr.sbin/ripd/log.c
+++ b/usr.sbin/ripd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.3 2009/11/02 20:28:49 claudio Exp $ */
+/* $OpenBSD: log.c,v 1.4 2011/08/20 19:02:28 sthen Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -44,7 +44,6 @@ log_init(int n_debug)
extern char *__progname;
debug = n_debug;
- verbose = n_debug;
if (!debug)
openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
diff --git a/usr.sbin/ripd/ripd.c b/usr.sbin/ripd/ripd.c
index ed0438c8cea..2efe37d293d 100644
--- a/usr.sbin/ripd/ripd.c
+++ b/usr.sbin/ripd/ripd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ripd.c,v 1.20 2010/02/08 00:26:51 guenther Exp $ */
+/* $OpenBSD: ripd.c,v 1.21 2011/08/20 19:02:28 sthen Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -129,6 +129,7 @@ main(int argc, char *argv[])
ripd_process = PROC_MAIN;
log_init(1); /* log to stderr until daemonized */
+ log_verbose(1);
while ((ch = getopt(argc, argv, "cdD:f:nv")) != -1) {
switch (ch) {
@@ -200,6 +201,7 @@ main(int argc, char *argv[])
errx(1, "unknown user %s", RIPD_USER);
log_init(debug);
+ log_verbose(conf->opts & RIPD_OPT_VERBOSE);
if (!debug)
daemon(1, 0);