diff options
| author | Roy Marples <roy@marples.name> | 2008-09-11 08:28:39 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-09-11 08:28:39 +0000 |
| commit | 03c2c87907acec01b024d525414bd76f7d001a15 (patch) | |
| tree | 41b68230e941af6e40088f8ab5ca987506a0b75e /dhcpcd.c | |
| parent | 9d94cb7804fb74fb2a6611e0e4e02ade206d38b4 (diff) | |
| download | dhcpcd-03c2c87907acec01b024d525414bd76f7d001a15.tar.xz | |
Allow quiet and nobackground to work in dhcpcd.conf
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -1002,9 +1002,6 @@ main(int argc, char **argv) while ((opt = getopt_long(argc, argv, IF_OPTS, cf_options, &oi)) != -1) { switch (opt) { - case 'b': - options |= DHCPCD_BACKGROUND; - break; case 'd': setlogmask(LOG_UPTO(LOG_DEBUG)); break; @@ -1017,16 +1014,9 @@ main(int argc, char **argv) case 'n': sig = SIGALRM; break; - case 'q': - setlogmask(LOG_UPTO(LOG_WARNING)); - options |= DHCPCD_QUIET; - break; case 'x': sig = SIGTERM; break; - case 'B': - options &= ~DHCPCD_DAEMONISE; - break; case 'T': options |= DHCPCD_TEST | DHCPCD_PERSISTENT; break; @@ -1047,6 +1037,13 @@ main(int argc, char **argv) exit(EXIT_FAILURE); } +#ifdef THERE_IS_NO_FORK + options &= ~DHCPCD_DAEMONISE; +#endif + + if (ifo->options & DHCPCD_QUIET) + setlogmask(LOG_UPTO(LOG_WARNING)); + /* If we have any other args, we should run as a single dhcpcd instance * for that interface. */ len = strlen(PIDFILE) + IF_NAMESIZE + 2; @@ -1057,10 +1054,6 @@ main(int argc, char **argv) snprintf(pidfile, len, PIDFILE, "", ""); options |= DHCPCD_MASTER; } - -#ifdef THERE_IS_NO_FORK - options &= ~DHCPCD_DAEMONISE; -#endif chdir("/"); umask(022); |
