PERFORCE change 66273 for review
Sam Leffler
sam at FreeBSD.org
Thu Dec 2 12:36:43 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=66273
Change 66273 by sam at sam_ebb on 2004/12/02 20:35:55
add -b (background) option to replace old -nw option;
may need to change it to be backwards compatible but
-nw isn't getopt friendly
Affected files ...
.. //depot/projects/wifi/sbin/dhclient/dhclient.c#3 edit
Differences ...
==== //depot/projects/wifi/sbin/dhclient/dhclient.c#3 (text+ko) ====
@@ -259,14 +259,18 @@
extern char *__progname;
int ch, fd, quiet = 0, i = 0;
int pipe_fd[2];
+ int immediate_daemon = 0;
struct passwd *pw;
/* Initially, log errors to stderr as well as to syslogd. */
openlog(__progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY);
setlogmask(LOG_UPTO(LOG_INFO));
- while ((ch = getopt(argc, argv, "c:dl:qu")) != -1)
+ while ((ch = getopt(argc, argv, "bc:dl:nqu")) != -1)
switch (ch) {
+ case 'b':
+ immediate_daemon = 1;
+ break;
case 'c':
path_dhclient_conf = optarg;
break;
@@ -379,6 +383,9 @@
setproctitle("%s", ifi->name);
+ if (immediate_daemon)
+ go_daemon();
+
ifi->client->state = S_INIT;
state_reboot(ifi);
More information about the p4-projects
mailing list