tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dhcpd.leases and rough edges in a fresh install



On Fri 03 Apr 2009 at 07:22:28 AM +1100, Tyler Retzlaff wrote:
>
>after installing a fresh netbsd system I usually bring up dhcpd. so
>I configure rc.conf and run /etc/rc.d/dhcpd start and I always see:
>
>/etc/rc.d/dhcpd: WARNING: /var/db/dhcpd.leases is not readable.


I remember that glitch, it motivated me to put *all* networking in
various /etc/ifconfig.* files, even when using dhcp, as such:

#:: Create configuration files to start networking at boot.
echo "dhclient=NO" >>/etc/rc.conf
cat >/etc/ifconfig.$i <<'EOF'
up
!dhclient $int
#22.33.44.50 netmask 255.255.255.240
#22.33.44.51 netmask 255.255.255.240 alias
#!route add default 22.33.44.1
EOF
# Re-start networking using new config files.
[ -e /var/run/dhclient.pid ] && dhclient -r
/etc/rc.d/network stop
/etc/rc.d/network start


IIRC the dhclient program doesn't throw the error, it just creates
the file. not sure why dhcpd doesn't try and touch the file.



Home | Main Index | Thread Index | Old Index