dhcp-3.0.4 with mac 10.3.9 Startup issue
donovan
donovan at beth.k12.pa.us
Fri Aug 18 03:57:20 UTC 2006
On Aug 17, 2006, at 10:47 AM, James Lee wrote:
> Hi All,
>
> I have install dhcp-3.0.4 on my mac OS 10.3.9 server.
>
> It has been running ok and I can start the DHCP services by typing
> 'sudo
> dhcpd'
>
> However, I can NOT configure it to startup on boot up.
>
> I have done the following below:
>
>
> 1. Add DHCP=-YES- to /etc/hostconfig entry
>
>
> 2. Make StartupItem folders:
>
> % mkdir /Library/StartupItems
> % mkdir /Library/StartupItems/DHCP
> % mkdir /Library/StartupItems/DHCP/Resources
> % mkdir /Library/StartupItems/DHCP/Resources/English.lpro
this has to be
/System/Library/StartupItems/DHCP/
<snip>
try this
#!/bin/sh
##
# DHCPD name service.
##
. /etc/rc.common
StartService ()
{
if [ "${DNS:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting DHCPD"
/usr/sbin/dhcpd
fi
}
StopService ()
{
ConsoleMessage "Stopping DHCPD"
kill -TERM `cat /var/run/dhcpd.pid`
}
RestartService ()
{
if [ "${DNSSERVER:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Restarting DHCPD"
if [ -x /var/run/dhcpd.pid ]; then
kill -HUP `cat /var/run/dhcpd.pid`
else
/usr/sbin/dhcpd
fi
else
StopService
fi
}
RunService "$1"
works for me. :)
More information about the dhcp-users
mailing list