mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 06:45:27 +00:00
Don't *require* a /etc/dhclient.conf file.
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: clparse.c,v 1.14 1998/03/16 06:02:14 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: clparse.c,v 1.15 1998/03/16 20:00:00 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -112,16 +112,18 @@ int read_client_conf ()
|
|||||||
top_level_config.send_options [DHO_DHCP_LEASE_TIME].len
|
top_level_config.send_options [DHO_DHCP_LEASE_TIME].len
|
||||||
= sizeof requested_lease_time;
|
= sizeof requested_lease_time;
|
||||||
|
|
||||||
if ((cfile = fopen (path_dhclient_conf, "r")) == NULL)
|
if ((cfile = fopen (path_dhclient_conf, "r")) != NULL) {
|
||||||
error ("Can't open %s: %m", path_dhclient_conf);
|
do {
|
||||||
do {
|
token = peek_token (&val, cfile);
|
||||||
token = peek_token (&val, cfile);
|
if (token == EOF)
|
||||||
if (token == EOF)
|
break;
|
||||||
break;
|
parse_client_statement (cfile,
|
||||||
parse_client_statement (cfile, (struct interface_info *)0,
|
(struct interface_info *)0,
|
||||||
&top_level_config);
|
&top_level_config);
|
||||||
} while (1);
|
} while (1);
|
||||||
token = next_token (&val, cfile); /* Clear the peek buffer */
|
token = next_token (&val, cfile); /* Clear the peek buffer */
|
||||||
|
fclose (cfile);
|
||||||
|
}
|
||||||
|
|
||||||
/* Set up state and config structures for clients that don't
|
/* Set up state and config structures for clients that don't
|
||||||
have per-interface configuration declarations. */
|
have per-interface configuration declarations. */
|
||||||
|
Reference in New Issue
Block a user