summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2019-07-15 11:07:00 +0000
committerkrw <krw@openbsd.org>2019-07-15 11:07:00 +0000
commit5683ab4174b136b3e47d10d0fcc65d6d36148cc1 (patch)
treec398693719fb53505e66752fcf7e7c4fc3dd9147
parentFix usage (diff)
downloadwireguard-openbsd-5683ab4174b136b3e47d10d0fcc65d6d36148cc1.tar.xz
wireguard-openbsd-5683ab4174b136b3e47d10d0fcc65d6d36148cc1.zip
Nuke '-l' command line option (alternate location for
dhclient.leases.<if>). ok kmos@
-rw-r--r--sbin/dhclient/dhclient.89
-rw-r--r--sbin/dhclient/dhclient.c17
2 files changed, 6 insertions, 20 deletions
diff --git a/sbin/dhclient/dhclient.8 b/sbin/dhclient/dhclient.8
index 90070a4a3ce..f4ef921e143 100644
--- a/sbin/dhclient/dhclient.8
+++ b/sbin/dhclient/dhclient.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dhclient.8,v 1.39 2019/02/26 20:32:23 jmc Exp $
+.\" $OpenBSD: dhclient.8,v 1.40 2019/07/15 11:07:00 krw Exp $
.\"
.\" Copyright (c) 1997 The Internet Software Consortium.
.\" All rights reserved.
@@ -35,7 +35,7 @@
.\" Enterprises. To learn more about the Internet Software Consortium,
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
.\" Enterprises, see ``http://www.vix.com''.
-.Dd $Mdocdate: February 26 2019 $
+.Dd $Mdocdate: July 15 2019 $
.Dt DHCLIENT 8
.Os
.Sh NAME
@@ -47,7 +47,6 @@
.Op Fl c Ar file
.Op Fl i Ar options
.Op Fl L Ar file
-.Op Fl l Ar file
.Ar interface
.Sh DESCRIPTION
The Dynamic Host Configuration Protocol (DHCP) allows hosts on a TCP/IP network
@@ -116,10 +115,6 @@ to the specified file.
will be the lease offered by the DHCP server;
.Dq effective
will be the modified lease bound to the interface.
-.It Fl l Ar file
-Specify an alternate location to
-.Pa /var/db/dhclient.leases . Ns Aq Ar IFNAME
-for the leases file.
.It Fl n
Configtest mode.
Only check the configuration file for validity.
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 33125f92462..208ee401cc1 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.642 2019/07/11 06:55:02 mestre Exp $ */
+/* $OpenBSD: dhclient.c,v 1.643 2019/07/15 11:07:00 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -450,7 +450,7 @@ main(int argc, char *argv[])
log_setverbose(0); /* Don't show log_debug() messages. */
- while ((ch = getopt(argc, argv, "c:di:l:L:nrv")) != -1)
+ while ((ch = getopt(argc, argv, "c:di:L:nrv")) != -1)
switch (ch) {
case 'c':
path_dhclient_conf = optarg;
@@ -463,14 +463,6 @@ main(int argc, char *argv[])
if (ignore_list == NULL)
fatal("ignore_list");
break;
- case 'l':
- path_lease_db = optarg;
- if (lstat(path_lease_db, &sb) != -1) {
- if (S_ISREG(sb.st_mode) == 0)
- fatalx("'%s' is not a regular file",
- path_lease_db);
- }
- break;
case 'L':
path_option_db = optarg;
if (lstat(path_option_db, &sb) != -1) {
@@ -574,8 +566,7 @@ main(int argc, char *argv[])
if ((pw = getpwnam("_dhcp")) == NULL)
fatalx("no such user: _dhcp");
- if (path_lease_db == NULL && asprintf(&path_lease_db, "%s.%s",
- _PATH_LEASE_DB, ifi->name) == -1)
+ if (asprintf(&path_lease_db, "%s.%s", _PATH_LEASE_DB, ifi->name) == -1)
fatal("path_lease_db");
interface_state(ifi);
@@ -667,7 +658,7 @@ usage(void)
fprintf(stderr,
"usage: %s [-dnrv] [-c file] [-i options] [-L file] "
- "[-l file] interface\n", __progname);
+ "interface\n", __progname);
exit(1);
}