#ifndef lint
static char copyright[] =
-"$Id: resolv.c,v 1.3 1997/06/03 00:47:40 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: resolv.c,v 1.4 1997/06/08 04:05:20 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
new_parse (path_resolv_conf);
eol_token = 1;
- if ((cfile = fopen (path_resolv_conf, "r")) == NULL)
- error ("Can't open %s: %m", path_resolv_conf);
+ if ((cfile = fopen (path_resolv_conf, "r")) == NULL) {
+ warn ("Can't open %s: %m", path_resolv_conf);
+ return;
+ }
+
do {
token = next_token (&val, cfile);
if (token == EOF)
/* Check /etc/resolv.conf and reload it if it's changed. */
if (cur_time > rcdate) {
- if (stat (path_resolv_conf, &st) < 0)
- error ("Can't stat %s", path_resolv_conf);
+ if (stat (path_resolv_conf, &st) < 0) {
+ warn ("Can't stat %s", path_resolv_conf);
+ return (struct sockaddr_in *)0;
+ }
if (st.st_mtime > rcdate) {
char rcbuf [512];
char *s, *t, *u;
database, dhcpd does not automatically restart itself when
it sees a change to the dhcpd.conf file.
+ Note: We get a lot of complaints about this. We realize
+ that it would be nice if one could send a SIGHUP to the
+ server and have it reload the database. This is not
+ technically impossible, but it would require a great deal
+ of work, our resources are extremely limited, and they can
+ be better spent elsewhere. So please don't complain
+ about this on the mailing list unless you're prepared to
+ fund a project to implement this feature, or prepared to
+ do it yourself.
+
C\bCO\bOM\bMM\bMA\bAN\bND\bD L\bLI\bIN\bNE\bE
The names of the network interfaces on which dhcpd should
listen for broadcasts may be specified on the command
the udp port number on which dhcpd should listen. This is
mostly useful for debugging purposes.
- To run dhcpd as a foreground process, rather than allowing
- it to run as a daemon in the background, the -\b-f\bf flag
- should be specified. This is useful when running dhcpd
- under a debugger, or when running it out of inittab on
- System V systems.
-
- To have dhcpd log to the standard error descriptor, spec-
- ify the -\b-d\bd flag. This can be useful for debugging, and
- also at sites where a complete log of all dhcp activity
- must be kept but syslogd is not reliable or otherwise
dhcpd(8) dhcpd(8)
- cannot be used. Normally, dhcpd will log all output
- using the syslog(3) function with the log facility set to
+ To run dhcpd as a foreground process, rather than allowing
+ it to run as a daemon in the background, the -\b-f\bf flag
+ should be specified. This is useful when running dhcpd
+ under a debugger, or when running it out of inittab on
+ System V systems.
+
+ To have dhcpd log to the standard error descriptor, spec-
+ ify the -\b-d\bd flag. This can be useful for debugging, and
+ also at sites where a complete log of all dhcp activity
+ must be kept but syslogd is not reliable or otherwise can-
+ not be used. Normally, dhcpd will log all output using
+ the syslog(3) function with the log facility set to
LOG_DAEMON.
Dhcpd can be made to use an alternate configuration file
left out entirely, but the subnet statement must appear.
-L\bLe\bea\bas\bse\be L\bLe\ben\bng\bgt\bth\bhs\bs
- DHCP leases can be assigned almost any length from zero
- seconds to infinity. What lease length makes sense for
- any given subnet, or for any given installation, will vary
- depending on the kinds of hosts being served.
- For example, in an office environment where systems are
- added from time to time and removed from time to time, but
- move relatively infrequently, it might make sense to allow
- lease times of a month of more. In a final test environ-
- ment on a manufacturing floor, it may make more sense to
dhcpd(8) dhcpd(8)
+L\bLe\bea\bas\bse\be L\bLe\ben\bng\bgt\bth\bhs\bs
+ DHCP leases can be assigned almost any length from zero
+ seconds to infinity. What lease length makes sense for
+ any given subnet, or for any given installation, will vary
+ depending on the kinds of hosts being served.
+
+ For example, in an office environment where systems are
+ added from time to time and removed from time to time, but
+ move relatively infrequently, it might make sense to allow
+ lease times of a month of more. In a final test environ-
+ ment on a manufacturing floor, it may make more sense to
assign a maximum lease length of 30 minutes - enough time
to go through a simple test procedure on a network appli-
ance before packaging it up for delivery.
filename "/tftpboot/haagen.boot";
}
-O\bOp\bpt\bti\bio\bon\bns\bs
- DHCP (and also BOOTP with Vendor Extensions) provide a
- mechanism whereby the server can provide the client with
- information about how to configure its network interface
- (e.g., subnet mask), and also how the client can access
- various network services (e.g., DNS, IP routers, and so
- on).
- These options can be specified on a per-subnet basis, and,
- for BOOTP clients, also on a per-client basis. In the
- event that a BOOTP client declaration specifies options
- that are also specified in its subnet declaration, the
dhcpd(8) dhcpd(8)
+O\bOp\bpt\bti\bio\bon\bns\bs
+ DHCP (and also BOOTP with Vendor Extensions) provide a
+ mechanism whereby the server can provide the client with
+ information about how to configure its network interface
+ (e.g., subnet mask), and also how the client can access
+ various network services (e.g., DNS, IP routers, and so
+ on).
+
+ These options can be specified on a per-subnet basis, and,
+ for BOOTP clients, also on a per-client basis. In the
+ event that a BOOTP client declaration specifies options
+ that are also specified in its subnet declaration, the
options specified in the client declaration take prece-
dence. An reasonably complete DHCP configuration might
look something like this:
-
-
-
-
-
-
-
-
-
-
-
-
5