summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcp/dhclient
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2001-02-23 16:51:17 +0000
committerBob Beck <beck@cvs.openbsd.org>2001-02-23 16:51:17 +0000
commit5654ba16ea45f48d965c063cfe7f2733083d88b0 (patch)
tree1dc0b070ceab58fa7da305d3be55ecfe56cd157a /usr.sbin/dhcp/dhclient
parent67e9581561b10a9d25b21c5873df44f9c8ad794b (diff)
cleanup after vacationing hippies and make dhclient create the
dhclient.leases file if it doesn't exist, so that install floppies work again, thanks Brian Kifiak <bk@rt.fm>
Diffstat (limited to 'usr.sbin/dhcp/dhclient')
-rw-r--r--usr.sbin/dhcp/dhclient/dhclient.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/dhcp/dhclient/dhclient.c b/usr.sbin/dhcp/dhclient/dhclient.c
index c73f10d7654..a84f39b4670 100644
--- a/usr.sbin/dhcp/dhclient/dhclient.c
+++ b/usr.sbin/dhcp/dhclient/dhclient.c
@@ -56,7 +56,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dhclient.c,v 1.15 2001/01/06 20:01:40 angelos Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.16 2001/02/23 16:51:16 beck Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -181,7 +181,7 @@ int main (argc, argv, envp)
read_client_conf ();
/* Lock the leases file */
- fd = open (path_dhclient_db, O_RDONLY | O_EXLOCK, 0);
+ fd = open (path_dhclient_db, O_RDONLY | O_EXLOCK | O_CREAT, 0);
if (fd < 0)
error ("can't open and lock %s: %m", path_dhclient_db);
@@ -509,7 +509,7 @@ void bind_lease (ip)
ip -> client -> new -> medium = ip -> client -> medium;
/* Lock the leases file */
- fd = open (path_dhclient_db, O_RDONLY | O_EXLOCK, 0);
+ fd = open (path_dhclient_db, O_RDONLY | O_EXLOCK | O_CREAT, 0);
if (fd < 0)
error ("can't open and lock %s: %m", path_dhclient_db);