3

I have dhcp3-server installed and configured, but I have to manually start the service every time the computer restarts. How can I make it start automatically on startup? I don't see a dhcp*.conf in /etc/init, and I have the correct interface specified in /etc/default/dhcp3-server

3
  • What happens when running sudo service dhcp3-server start? If you're asked to check syslog, what does it say? Sep 15, 2010 at 23:34
  • The init file is "/etc/init.d/dhcp3-server" not "/etc/init.d/dhcp3-server.conf" It might also be useful to share the contents of your "/etc/dhcp3/dhcpd.conf" file with us. Oct 4, 2010 at 18:47
  • It starts fine using the 'service' command after the system boots fully.
    – Chris S.
    Mar 4, 2013 at 4:25

2 Answers 2

2

If andrewsomething is right you may want to check if the service is added to the system bootup run this

sudo update-rc.d dhcp3-server defaults
0

I think I originally asked this question about Ubuntu 10.04 LTS and it was fixed at some point (I think 10.04.4), but after upgrading to 12.04 LTS I started having this same issue again! I found a fix for it and just wanted to post an update with what I had to do.

The trick was to edit the init file. Change the "start on..." line. Add the following to the end of the line:

and net-device-up IFACE=<your DHCP server IP>

So my my "start on" line looks like this now:

start on runlevel [2345] and net-device-up IFACFE=eth1

The problem was that the dhcp server was trying to start before eth1 was ready. This makes it wait until eth1 is up and ready before trying to start the dhcp server.

Not the answer you're looking for? Browse other questions tagged .