Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Complete Startup properties' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Complete Startup properties
Authored by: skab on May 22, '01 12:34:17AM

Great tip!

Actually it's really simple, no need to "touch" something ;-). Just copy one of the StartupItem folders from /System/Library/StartupItems to /Library/StartupItems and change the file names, property file and the actual start script. I chose the Apache folder, since it's just another server.

The "Requires" part is quite important, since the startup items are called depending on their requirements. AppleShare needs Network, so it will be loaded after the item that "provides" (the other tag, see below) "Network". I change the MySQL user in my /etc/my.cnf file (simply add "user=mysql" below [mysqld], look in the mysql dir for some sample config files), so I must make sure that NetInfo is loaded before the MySQL server, since NetInfo actually creates the users/groups (/etc/passwd is actually a dummy file). Choosing "Resolver" for "Requires" is not quite the right thing, but it does the trick, since NetInfo and Resolver are provided by the same startup item. I was lazy and put some requirements in there to be safe, but I guess "NetInfo" is all that's needed. Play around with it, I'm too tired now ;-)

If you're from a non-English speaking country like me, the files in the Resources folder (see the other items in /System/Library/StartupItems for reference) are interesting, since you can translate the message on the startup box into your language. Use PropertyListEditor to play around with it, it's foolproof, it worked immediately when I tried it.

Have fun!

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>Description</key>
<string>MySQL server</string>
<key>Messages</key>
<dict>
<key>start</key>
<string>Starting MySQL server</string>
<key>stop</key>
<string>Stopping MySQL server</string>
</dict>
<key>OrderPreference</key>
<string>None</string>
<key>Provides</key>
<array>
<string>SQL Server</string>
</array>
<key>Requires</key>
<array>
<string>Disks</string>
<string>NetInfo</string>
<string>NIS</string>
<string>Resolver</string>
</array>
</dict>
</plist>



[ Reply to This | # ]