dhcp-3.0.4 with mac 10.3.9 Startup issue
James Lee
james.lee at intouchplc.com
Thu Aug 17 14:47:07 UTC 2006
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.lproj
3. Make /Library/StartupItems/DHCP/DHCP. On my network, DHCP is being
served by en0; modify "/usr/sbin/dhcpd en0" to taste:
______________________________________________________________________
#!/bin/sh
##
# DHCP
##
. /etc/rc.common
StartService ()
{
if [ "${DHCP:=-NO-}" = "-YES-" ]; then
if ! pid=$(GetPID dhcpd); then
ConsoleMessage "Starting DHCP services"
/usr/sbin/dhcpd en0
fi
fi
}
StopService ()
{
if pid=$(GetPID dhcpd); then
ConsoleMessage "Stopping DHCP services"
kill -TERM "${pid}"
else
echo "dhcpd is not running."
fi
}
RestartService ()
{
if pid=$(GetPID sendmail); then
ConsoleMessage "Restarting DHCP services"
kill -HUP "${pid}"
else
StartService
fi
}
RunService "$1"
______________________________________________________________________
4. Make /Library/StartupItems/DHCP/StartupParameters.plist:
______________________________________________________________________
{
Description = "DHCP server";
Provides = ("DHCP");
Requires = ("Network");
Uses = ("Disks", "Network Time");
OrderPreference = "None";
}
______________________________________________________________________
NOTE: THE ABOVE MALFORMATION ERROR SO I CHANGED IT TO;
______________________________________________________________________
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>DHCP server</string>
<key>Messages</key>
<dict>
<key>start</key>
<string>Starting DHCP server</string>
<key>stop</key>
<string>Stopping DHCP server</string>
</dict>
<key>OrderPreference</key>
<string>None</string>
<key>Provides</key>
<array>
<string>DHCP</string>
</array>
<key>Requires</key>
<array>
<string>Network</string>
</array>
<key>Uses</key>
<array>
<string>Disks</string>
<string>Network Time</string>
</array>
</dict>
</plist>
______________________________________________________________________
5. Make /Library -> StartupItems -> DHCP -> Resources -> English.lproj ->
Localizable.strings:
______________________________________________________________________
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/
Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>Starting DHCP services</key>
<string>Starting DHCP services</string>
<key>Stopping DHCP services</key>
<string>Stopping DHCP services</string>
<key>Restarting DHCP services</key>
<string>Restarting DHCP services</string>
</dict>
</plist>
______________________________________________________________________
6 Set ownership and permissions:
% chown -R root.wheel /Library/StartupItems/DHCP
% chmod -R 755 /Library/StartupItems/DHCP
% chmod 644 /Library/StartupItems/DHCP/StartupParameters.plist
7. Finally, start the DHCP services:
% sudo SystemStarter start DHCP
______________________________________________________________________
However, when I run
% sudo SystemStarter start DHCP
It ERRORS with:
______________________________________________________________________________
Welcome to Macintosh.
Initializing network
Exec failed for item /Library/StartupItems/DHCP: Exec format error
DHCP server (6970) did not complete successfully.
The following StartupItems failed to properly start:
/Library/StartupItems/DHCP - execution of Startup script failed
Startup complete.
Hangup
________________________________________________________________________________
Can anyone tell me how to fix this problem?
Thanks
James
http://www.theintouchgroup.com
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service.
More information about the dhcp-users
mailing list