Confusion With StartUp Frameworks

Eckhart

Baron in the Trees
I have been installing several startup frameworks that automatically load my scripts. It works perfectly fine for all of them exept for ipfw in "Firewall/Firewall".

Im 99.9 % sure, there is everything alright with the StartupParameters.plist, the permissions and so on.

Yet, there must be some place where Apple explicitly stores which of the bundles in "/System/Library/StartupItems" it starts and which it skips. Is this correct? If so, where is it?

Secondly, if not, it must be skipping my firewall, because MacOSX uses "ipfw" too, causing a conflict that disables loading my firewall rules. Any experiences?

All hints are appreciated. And thanks a lot for reading this.
 
Um, you should really be putting any startup items you create in /Library/StartupItems (you might have to make that folder, I don't think it's there by default). That's where "3rd party" stuff is supposed to go. Also, you don't have to be root/use sudo to put things there. ;)

Yes, the file /etc/hostconfig is the file you're thinking of. But if you don't do any of those tests that are in the normal set of startup items (i.e. if [ "${MAILSERVER:=-NO-}" = "-YES-" ]; then), then you don't have to worry about /etc/hostconfig. If you did do that, put whatever you named it followed by -YES-.

You shouldn't have any (direct) problems using ipfw, but if Apple's firewall stuff is running after yours, it may be overwriting your config. You might want to make your startup item run your firewall stuff after the default firewall stuff runs. If you want it to load after Apple's firewall one does, edit your StartupParameters.plist to have Requires set to require "NetworkExtensions" - that's where Apple's default firewall stuff starts up. If you require that, then you're guaranteed that yours will start after it.
 
I've already gone through "/etc/hostconfig", but the last point hit it: "NeworkExtensions" was what I was looking for, so thanks a lot.

Btw, what was the point about "sudo"? Have I mentioned that in any way? I haven't even set a root passwd on this machine ;)
 
Well, when you use sudo, you enter your admin password, not a root password...but the point was that you wouldn't need to use it if you add items to /Library/StartupItems rather than /System/Library/StartupItems, where you would have to use it to add new stuff (unless you've edited the permissions...). Just tryin to save some steps for you there, that was all.

And you're welcome. :)
 
Back
Top