[plug] chkconfig + dhcpd
Anthony J. Breeds-Taurima
tony at cantech.net.au
Tue Sep 5 11:02:19 WST 2000
On Tue, 5 Sep 2000, Earnshaw, Mike wrote:
> Just downloaded the latest(?) dhcp tarball from isc.org. It compiled and
> installed OK. I am having a few problems getting chkconfig to add the
> daemon. If I use chkconfig --add /usr/sbin/dhcpd it reports error
> reading information on service (which I would kind of expect since this
> is the binary) but I get the same message when I point chkconfig to the
> directory I used for the untar etc.
chkconfig doesn't work on binaries. chkconfig is designed to work in
conjunction with the SysV startup system.
What you need to do is make s shell script that can start and stop the dhcp
daemon.
---
#!/bin/sh
# chkconfig: 345 65 35
case "$1" in
start)
/usr/sbin/dhcpd
;;
stop)
killall dhcpd
;;
*)
echo dhcpd {start|stop}
esac
---
you that as a template .... The comment line with chkconfig is the key.
(
After chkconfig there are 3 numbers:
345 == start at Run levels 3, 4 and 5.
65 == what "priority to start it at" .... 65 is GUARANTEED to start after ALL
scripts with a priority 64 or lower. Any scripts with a priority of 66
or higher will start AFTER this script.
35 == what priority to stop at (general rule is 100-the start value.
)
place that script in /etc/rc.d/init.d/ call it dhcpd make it executable.
then run
chkconfig --del dhcpd # Just to make sure you know how things are.
chkconfig --add dhcpd # Now add it.
chkconfig --list dhcpd # Check it going to start when you think.
Next time you reboot the system dhcpd should start up. To start it this time.
run /etc/rc.d/init.d/dhcpd start
> I can not seem to work out where to locate the information on service
> for this. Any pointers please?
HTH
Yours Tony.
/*
* "The significant problems we face cannot be solved at the
* same level of thinking we were at when we created them."
* --Albert Einstein
*/
More information about the plug
mailing list