diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-08-24 15:06:04 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-08-24 15:06:04 +0000 |
commit | 5257113d57679a8c17688a78940823bb03f2c460 (patch) | |
tree | 10c439f20b665c61310ff5efe5569fc0efa7cbfd | |
parent | 926402bbfea3baf3e043e75d9bb125259937a8a9 (diff) |
revert r1.16, dhclient has to work without a config file at least on the
install media, theo ok
-rw-r--r-- | sbin/dhclient/clparse.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c index ab631b24d5d..a448ddad742 100644 --- a/sbin/dhclient/clparse.c +++ b/sbin/dhclient/clparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clparse.c,v 1.16 2004/07/04 23:33:49 henning Exp $ */ +/* $OpenBSD: clparse.c,v 1.17 2004/08/24 15:06:03 henning Exp $ */ /* Parser for dhclient config and lease files... */ @@ -96,18 +96,16 @@ read_client_conf(void) top_level_config.requested_options [top_level_config.requested_option_count++] = DHO_HOST_NAME; - if ((cfile = fopen(path_dhclient_conf, "r")) == NULL) - error("can't open config file %s: %m", - path_dhclient_conf); - - do { - token = peek_token(&val, cfile); - if (token == EOF) - break; - parse_client_statement(cfile, NULL, &top_level_config); - } while (1); - token = next_token(&val, cfile); /* Clear the peek buffer */ - fclose(cfile); + if ((cfile = fopen(path_dhclient_conf, "r")) != NULL) { + do { + token = peek_token(&val, cfile); + if (token == EOF) + break; + parse_client_statement(cfile, NULL, &top_level_config); + } while (1); + token = next_token(&val, cfile); /* Clear the peek buffer */ + fclose(cfile); + } /* * Set up state and config structures for clients that don't |