Browse Source

dhcpd: start from rc, controlled by rc.conf; sample config files

OPENBSD_2_4
form 26 years ago
parent
commit
75a9ccf047
4 changed files with 42 additions and 11 deletions
  1. +22
    -0
      src/etc/dhcpd.conf
  2. +7
    -0
      src/etc/dhcpd.interfaces
  3. +11
    -9
      src/etc/rc
  4. +2
    -2
      src/etc/rc.conf

+ 22
- 0
src/etc/dhcpd.conf View File

@ -0,0 +1,22 @@
# $OpenBSD: dhcpd.conf,v 1.1 1998/08/19 04:25:45 form Exp $
#
# DHCP server options.
# See dhcpd.conf(5) and dhcpd(8) for more information.
#
# Network: 192.168.1.0/255.255.255.0
# Domain name: my.domain
# Name servers: 192.168.1.3 and 192.168.1.5
# Default router: 192.168.1.1
# Addresses: 192.168.1.32 - 192.168.1.127
#
shared-network LOCAL-NET {
option domain-name "my.domain";
option domain-name-servers 192.168.1.3, 192.168.1.5;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
range 192.168.1.32 192.168.1.127;
}
}

+ 7
- 0
src/etc/dhcpd.interfaces View File

@ -0,0 +1,7 @@
# $OpenBSD: dhcpd.interfaces,v 1.1 1998/08/19 04:25:45 form Exp $
#
# List of network interfaces served by dhcpd(8).
#
# ep0
# ed0 le0
# de1

+ 11
- 9
src/etc/rc View File

@ -1,4 +1,4 @@
# $OpenBSD: rc,v 1.85 1998/08/18 23:54:41 marc Exp $
# $OpenBSD: rc,v 1.86 1998/08/19 04:25:46 form Exp $
# System startup script run by init on autoboot
# or after single-user.
@ -333,6 +333,16 @@ if [ "X${mrouted_flags}" != X"NO" ]; then
echo -n ' mrouted'; mrouted $mrouted_flags
fi
# $dhcpd_flags is imported from /etc/rc.conf
# If $dhcpd_flags == NO or /etc/dhcpd.conf doesn't exist, then dhcpd isn't run.
if [ "X${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then
touch /var/db/dhcpd.leases
if [ -f /etc/dhcpd.interfaces ]; then
dhcpd_ifs=`cat /etc/dhcpd.interfaces | awk -F\# '{ print $1; }'`
fi
echo -n ' dhcpd'; /usr/sbin/dhcpd ${dhcpd_flags} ${dhcpd_ifs}
fi
# $rwhod is imported from /etc/rc.conf;
# if $rwhod == YES, rwhod is run.
if [ X${rwhod} = X"YES" ]; then
@ -435,15 +445,7 @@ fi
[ -f /etc/rc.local ] && . /etc/rc.local
echo -n standard daemons:
# $apmd_flags is imported from /etc/rc.conf;
# don't run daemon if $apmd_flags == NO or /usr/sbin/apmd doesn't exist
if [ "X${apmd_flags}" != X"NO" -a -x /usr/sbin/apmd ]; then
echo -n ' apmd'; /usr/sbin/apmd ${apmd_flags}
fi
echo -n ' cron'; cron
echo '.'
date


+ 2
- 2
src/etc/rc.conf View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $OpenBSD: rc.conf,v 1.25 1998/08/18 23:54:42 marc Exp $
# $OpenBSD: rc.conf,v 1.26 1998/08/19 04:25:49 form Exp $
# set these to "NO" to turn them off. otherwise, they're used as flags
routed_flags=NO # for 'normal' use: routed_flags="-q"
@ -15,7 +15,7 @@ timed_flags=NO # for 'normal' use: timed_flags=""
photurisd_flags=NO # for 'normal' use: photurisd_flags=""
mopd_flags=NO # for 'normal' use: mopd_flags="-a"
httpd_flags=NO # for 'normal' use: httpd_flags=""
apmd_flags=NO # for 'normal' use: apmd_flags=""
dhcpd_flags=NO # for 'normal' use: dhcpd_flags="-q"
# On some architectures, you must also disable console getty in /etc/ttys
xdm_flags=NO # for 'normal' use: xdm_flags=""


Loading…
Cancel
Save