move the option printing stuff a little earlier, take out
authorPaul Mackerras <paulus@samba.org>
Fri, 9 Mar 2001 00:55:14 +0000 (00:55 +0000)
committerPaul Mackerras <paulus@samba.org>
Fri, 9 Mar 2001 00:55:14 +0000 (00:55 +0000)
unnecessary openlog from sys_init in sys_linux.c

pppd/main.c
pppd/sys-linux.c

index 24f88ec9934b588866713b1b790fc02c2ca37b13..a6f4e06d6274ff721d2b3b4517167f5ba1385db6 100644 (file)
@@ -17,7 +17,7 @@
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define RCSID  "$Id: main.c,v 1.103 2001/03/08 05:11:14 paulus Exp $"
+#define RCSID  "$Id: main.c,v 1.104 2001/03/09 00:55:14 paulus Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -304,11 +304,8 @@ main(argc, argv)
     if (the_channel->process_extra_options)
        (*the_channel->process_extra_options)();
 
-    if (dump_options || dryrun) {
-       init_pr_log(NULL, LOG_INFO);
-       print_options(pr_log, NULL);
-       end_pr_log();
-    }
+    if (debug)
+       setlogmask(LOG_UPTO(LOG_DEBUG));
 
     /*
      * Check that we are running as root.
@@ -340,15 +337,19 @@ main(argc, argv)
     if (the_channel->check_options)
        (*the_channel->check_options)();
 
+
+    if (dump_options || dryrun) {
+       init_pr_log(NULL, LOG_INFO);
+       print_options(pr_log, NULL);
+       end_pr_log();
+       if (dryrun)
+           die(0);
+    }
+
     /*
      * Initialize system-dependent stuff.
      */
     sys_init();
-    if (debug)
-       setlogmask(LOG_UPTO(LOG_DEBUG));
-
-    if (dryrun)
-       die(0);
 
     pppdb = tdb_open(_PATH_PPPDB, 0, 0, O_RDWR|O_CREAT, 0644);
     if (pppdb != NULL) {
index d5dbfafbc47107c8b86fea1d3a9abe0b471c9438..017248b590f3a70c66c84b083760cad8abe1a4d5 100644 (file)
@@ -263,11 +263,6 @@ void sys_init(void)
 {
     int flags;
 
-    openlog("pppd", LOG_PID | LOG_NDELAY, LOG_PPP);
-    setlogmask(LOG_UPTO(LOG_INFO));
-    if (debug)
-       setlogmask(LOG_UPTO(LOG_DEBUG));
-
     if (new_style_driver) {
        ppp_dev_fd = open("/dev/ppp", O_RDWR);
        if (ppp_dev_fd < 0)