summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2006-08-21 16:31:31 +0000
committerbrian <brian@FreeBSD.org>2006-08-21 16:31:31 +0000
commit1e80c6d4b6d3c03b582b475466f209323388598a (patch)
treed73f70aa03bf4d311df8e00e16c10b11304ca002 /sbin
parentcf0232c4fc4a1a3949a739a250a1067625127b63 (diff)
downloadFreeBSD-src-1e80c6d4b6d3c03b582b475466f209323388598a.zip
FreeBSD-src-1e80c6d4b6d3c03b582b475466f209323388598a.tar.gz
Revert the addition of -p. It's flawed in that dhclient should not run
on an interface without carrier. devd should be used instead to handle link up/down events. Put on the right path by: brooks, sam
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/dhclient.812
-rw-r--r--sbin/dhclient/dhclient.c20
2 files changed, 7 insertions, 25 deletions
diff --git a/sbin/dhclient/dhclient.8 b/sbin/dhclient/dhclient.8
index 98fa08f..281159f 100644
--- a/sbin/dhclient/dhclient.8
+++ b/sbin/dhclient/dhclient.8
@@ -38,7 +38,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 17, 2006
+.Dd July 22, 2005
.Dt DHCLIENT 8
.Os
.Sh NAME
@@ -46,7 +46,7 @@
.Nd "Dynamic Host Configuration Protocol (DHCP) client"
.Sh SYNOPSIS
.Nm
-.Op Fl bdpqu
+.Op Fl bdqu
.Op Fl c Ar file
.Op Fl l Ar file
.Ar interface
@@ -83,14 +83,6 @@ will revert to running in the background.
Specify an alternate location,
.Ar file ,
for the leases file.
-.It Fl p
-Tells
-.Nm
-to persist in trying to configure the interface, despite
-an inability to gain carrier.
-This is used to survive switch outages and when
-.Nm
-is required as soon as the cable is connected.
.It Fl q
Forces
.Nm
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index b85cfc4..ce40562 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -295,14 +295,13 @@ main(int argc, char *argv[])
int ch, fd, quiet = 0, i = 0;
int pipe_fd[2];
int immediate_daemon = 0;
- int persist = 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, "bc:dl:pqu")) != -1)
+ while ((ch = getopt(argc, argv, "bc:dl:qu")) != -1)
switch (ch) {
case 'b':
immediate_daemon = 1;
@@ -316,9 +315,6 @@ main(int argc, char *argv[])
case 'l':
path_dhclient_db = optarg;
break;
- case 'p':
- persist = 1;
- break;
case 'q':
quiet = 1;
break;
@@ -366,18 +362,12 @@ main(int argc, char *argv[])
fprintf(stderr, ".");
fflush(stderr);
if (++i > 10) {
- if (persist) {
- fprintf(stderr, " giving up for now\n");
- break;
- } else {
- fprintf(stderr, " giving up\n");
- exit(1);
- }
+ fprintf(stderr, " giving up\n");
+ exit(1);
}
sleep(1);
}
- if (i <= 10)
- fprintf(stderr, " got link\n");
+ fprintf(stderr, " got link\n");
}
if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1)
@@ -447,7 +437,7 @@ usage(void)
{
extern char *__progname;
- fprintf(stderr, "usage: %s [-bdpqu] ", __progname);
+ fprintf(stderr, "usage: %s [-bdqu] ", __progname);
fprintf(stderr, "[-c conffile] [-l leasefile] interface\n");
exit(1);
}
OpenPOWER on IntegriCloud