Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > /System/Library/StartupItems

/System/Library/StartupItems
Thread Tools
Mac Elite
Join Date: Mar 2001
Location: Provo, UT
Status: Offline
Reply With Quote
Jul 30, 2003, 07:37 PM
 
Dumb question. If I want mysql to start automatically (or any other service) I create a directory in /System/Library/StartupItems with a script (apparently of any name). The script in the directory gets exectuted.

However I notice that almost all the scripts have an associated plist which is named StartupParameters.plist. Do you need to have that? All it seems to do is have a few names and messages.

Any links to the "idiots guide to how startup scripts work in Darwin"?

I have mysql installed via Fink, but I don't believe that /sw/bin/safe_mysql actually ever gets executed. . .

I read somewhere that you execute a command "daemonic" but I don't think that actually is a command (that I can see in the man pages)
     
Mac Elite
Join Date: Mar 2001
Location: Provo, UT
Status: Offline
Reply With Quote
Jul 30, 2003, 07:55 PM
 
Found some stuff myself. I guess Daemonic is available with Fink and sets all those things up for you.

Here's a nice tutorial. (Very good site)

http://snow.prohosting.com/guru4mac/...on_macosx.html
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jul 30, 2003, 09:33 PM
 
Just an fyi, don't put anything in /System/Library/StartupItems/ -- instead, put them in /Library/StartupItems. -- /System is for OS-level stuff only and could be overwritten in new OS upgrades.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status: Offline
Reply With Quote
Jul 30, 2003, 10:11 PM
 
Indeed, Apple's intended location for user-added startup scripts is:
/Library/StartupItems

You can read more about their creation and deployment here:
Creating SytemStarter Startup Item Bundles HOWTO
http://developer.apple.com/documenta...ter_howto.html
Booting and Logging In: Customization Techniques
http://developer.apple.com/documenta...section_4.html
Mac OS X 10.2: How to Set the MTU Value During Startup
http://docs.info.apple.com/article.html?artnum=107474
Mac OS X 10.2: How to Set Ethernet Speed and Duplex During Startup
http://docs.info.apple.com/article.html?artnum=107475
     
Mac Elite
Join Date: Mar 2001
Location: Provo, UT
Status: Offline
Reply With Quote
Jul 31, 2003, 03:11 AM
 
Thanks for the info.

Oh, I found some limited documentation on Daemonic as well.

http://daemonic.sourceforge.net/

Regarding mySQL the following has a reasonable tutorial and a startupitem all configured for you.

http://www.entropy.ch/software/macosx/mysql/

There is one big question I have after playing around with the poorly documented daemonic and trying to get mySQL to work in the StartUpItems directory.

StartUpItems have in their plist three commands: start, stop, and restart.

However with Jaguar Apple pretty much only supports starting daemons and not stopping them at shutdown. (Well, they have a little known application called SystemStarter which can do all of them - but that's kind of useless)

So the big question is whether Panther shuts daemons like mySQL down gracefully. That has been a rather large, gaping bug in OSX - especially considering it has probably been there since the old NeXT days.
(Last edited by clarkgoble; Jul 31, 2003 at 03:37 AM. )
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:26 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2