Darwin wishlist

Or perhaps I should call it the missing bits.


  • no file retrieval software tools (curl or wget) are installed in Darwin. So bootstrapping fink or other improvements are pretty hard to do.

  • console logging seems to be missing. In OS X you can use ConsoleMessage to write to the Console application’s log: there is no such animal in an aqua-less environment. System.log does not pick up the slack.

  • the /Library/StartupItems directory is not created at installation time. OS 9 created folders without contents, why shouldn’t the newer OSes, especially if they’re supposed to be used?

  • it’s not clear that StartupItems are handled the same as on OS X: I know startup scripts that don’t reference trigger values in /etc/hostconfig will never start and I think OS X is more flexible, but I haven’t tested it lately. The hostconfig file is mentioned twice in the overview to OS X and this dependency/requirement is never mentioned.

  • Console logging seems to have ended up on the cutting room floor: the function ConsoleMessage in /etc/rc.common will dump into /private/var/tmp/console.log on OS X, but there’s no such place in Darwin. I added some stuff to rc.common to address this, but I’m sure someone at Apple or OpenDarwin could come up with something better.

My suspicion is that Apple may have cut too deep when they split Darwin off from OS X and took off a little too much.

I have read through “Inside Mac OS X: System Overview” and as an overview, it’s great, but as a guide to implementation, it’s not as valuable. It’s a little too non-commital on what may be supported in future: that suggests to me that given the choice of following the spec or copying what’s known to work, you go with what works and let the spec catch up.

This is what I added to rc.common:

##
# Print a message to the console and display it in the startup screen and to
# the console.log file
##
ConsoleMessage()
{
local Message=”$*”
# factory-installed version ends here. home-brew mods follow.

local Date=`date “+[%a %b %e %H:%M:%S %Z %Y]”`
local Hostname=`uname -n`
echo “${Message}”
echo “${Date} ${Hostname} ${Message}” >> /private/var/tmp/console.log
}

##