DHCP shell script doesn't respond

Hi all
I've got a dhcpd.conf file that is working with no problem in my home.
I've just installed the same isc-dhcpd31-server in the work place, put the same file and:
Code:
eds#
eds# /usr/local/etc/rc.d/isc-dhcpd start
eds#
eds# /usr/local/etc/rc.d/isc-dhcpd stop
eds#
eds#
eds#
eds# /usr/local/etc/rc.d/isc-dhcpd start
eds# /usr/local/etc/rc.d/isc-dhcpd start
eds#
eds# /usr/local/etc/rc.d/isc-dhcpd stop
eds# /usr/local/etc/rc.d/isc-dhcpd stop
eds#
eds# /usr/local/etc/rc.d/isc-dhcpd status
eds#

it doesn't print anything and there's no record about it in /var/log/messages

Anobody have idea what's wrong???
Thank you!
 
Have you looked at /var/log/dhcp.log? Are your dhcpd_ settings in /etc/rc.conf correct (correct interface name, existing rootdir, for example)?
 
/etc/rc.conf:
Code:
linux_enable="YES"
sshd_enable="YES"
defaultrouter="192.168.10.1"
hostname="dhcp.deltanews.bg"
ifconfig_re0="inet 192.168.10.5 netmask 255.255.255.0"
samba_enable="YES"
dhcpd_enagle="YES"
dhcpd_ifaces="re0"
/var/log... no dhcp log, I thing there was no created log because I couldn't start start the server:
Code:
dhcp# pwd
/var/log
dhcp# ls
ConsoleKit      cron.2.bz2      lpd-errs        maillog.3.bz2   messages        samba           sendmail.st.2   userlog
auth.log        debug.log       maillog         maillog.4.bz2   messages.0.bz2  security        sendmail.st.3   wtmp
cron            dmesg.today     maillog.0.bz2   maillog.5.bz2   mount.today     sendmail.st     sendmail.st.4   xferlog
cron.0.bz2      dmesg.yesterday maillog.1.bz2   maillog.6.bz2   pf.today        sendmail.st.0   setuid.today
cron.1.bz2      lastlog         maillog.2.bz2   maillog.7.bz2   ppp.log         sendmail.st.1   slip.log
dhcp#

/usr/local/etc/dhcpd.conf
Code:
dhcp# cat dhcpd.conf
option domain-name "Deltanews.bg";
option domain-name-servers 192.168.10.7, 192.168.10.5;
option subnet-mask 255.255.255.0;

default-lease-time 3600;
max-lease-time 86400;
ddns-update-style none;

subnet 192.168.10.0 netmask 255.255.255.0 {
  range 192.168.10.20 192.168.10.254;
  option routers 192.168.10.1;
}

host mailhost {
  hardware ethernet 02:03:04:05:06:07;
  fixed-address mx.deltanews.bg;
}


dhcp#
Any more ideas??
Thank you!
 
OK I'll fix it :)
but doesn't it work only on startup??
I meen even if I don't put in there dhcp_enable=yes, when I try to strat the script, shouldn't it run anyway??? or give me a error???
 
You should be able to start it without the dhcpd_enable in rc.conf but you have to use onestart:
# /usr/local/etc/rc.d/isc-dhcpd onestart

Start/stop only works if you have an *_enable in rc.conf.
 
Yeah looks like "status" is also working only with *_enable in rc.conf :)
It run with "onestart" and when I fix the rc.conf it run normaly, I didn't know that. Thank you!
And next time I'll write the configuration files more carefully.
 
Back
Top