I have a second disk inside my G4 desktop, but don't want users to see it when they log in. So I want to unmount it at system boot time. Here is one way; maybe someone will tell us a simpler way. An earlier hint does something similar during login, but this one does it for all users during startup. Here's how:
drwxr-xr-x root wheel Unmount
-rwxr-xr-x root wheel Unmount
-rw-r--r-- root wheel StartupParameters.plist
The file Unmount is a shell script (change disk0s5 to whatever your device name is):
#!/bin/sh
. /etc/rc.common
if [ "$1" == "start" ]
then
/usr/sbin/diskutil unmount /dev/disk0s5
fi
The file StartupParameters.plist is a properties list:
<?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>Try to unmount the old disk</string>
<key>Provides</key>
<array>
<string>Unmount</string>
</array>
</dict>
</plist>
I tested it on 10.4 but it should work from 10.2 an onwards, at least.
Mac OS X Hints
http://hints.macworld.com/article.php?story=2005052804075538