summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1996-08-29 20:15:32 +0000
committerTed Lemon <source@isc.org>1996-08-29 20:15:32 +0000
commitf5d07a3896e194acc01da7932f3d2834c11d06b5 (patch)
tree796a8ede90abf8155bb874aa886cc2821e7f1d58
parentef6f87b4d6f3c05dc5e76b28b525631977e10d1c (diff)
downloadisc-dhcp-f5d07a3896e194acc01da7932f3d2834c11d06b5.tar.gz
Fix logging to stderr
-rw-r--r--dhcpd.c11
-rw-r--r--server/dhcpd.c11
2 files changed, 16 insertions, 6 deletions
diff --git a/dhcpd.c b/dhcpd.c
index 12054dc9..1b0c100c 100644
--- a/dhcpd.c
+++ b/dhcpd.c
@@ -41,7 +41,7 @@
*/
static char objcopyright[] =
-"$Id: dhcpd.c,v 1.29 1996/08/29 09:55:52 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.30 1996/08/29 20:15:32 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
static char copyright[] =
"Copyright 1995, 1996 The Internet Software Consortium.";
static char arr [] = "All rights reserved.";
@@ -118,7 +118,7 @@ int main (argc, argv, envp)
} else if (!strcmp (argv [i], "-d")) {
#ifndef DEBUG
daemon = 0;
- log_perror = 1;
+ log_perror = -1;
#endif
} else if (argv [i][0] == '-') {
usage ();
@@ -137,7 +137,12 @@ int main (argc, argv, envp)
}
}
- log_perror = 0;
+ /* If we were requested to log to stdout on the command line,
+ keep doing so; otherwise, stop. */
+ if (log_perror == -1)
+ log_perror = 1;
+ else
+ log_perror = 0;
#ifndef DEBUG
if (daemon) {
diff --git a/server/dhcpd.c b/server/dhcpd.c
index 12054dc9..1b0c100c 100644
--- a/server/dhcpd.c
+++ b/server/dhcpd.c
@@ -41,7 +41,7 @@
*/
static char objcopyright[] =
-"$Id: dhcpd.c,v 1.29 1996/08/29 09:55:52 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.30 1996/08/29 20:15:32 mellon Exp $ Copyright 1995, 1996 The Internet Software Consortium.";
static char copyright[] =
"Copyright 1995, 1996 The Internet Software Consortium.";
static char arr [] = "All rights reserved.";
@@ -118,7 +118,7 @@ int main (argc, argv, envp)
} else if (!strcmp (argv [i], "-d")) {
#ifndef DEBUG
daemon = 0;
- log_perror = 1;
+ log_perror = -1;
#endif
} else if (argv [i][0] == '-') {
usage ();
@@ -137,7 +137,12 @@ int main (argc, argv, envp)
}
}
- log_perror = 0;
+ /* If we were requested to log to stdout on the command line,
+ keep doing so; otherwise, stop. */
+ if (log_perror == -1)
+ log_perror = 1;
+ else
+ log_perror = 0;
#ifndef DEBUG
if (daemon) {