Some days ago I was annoyed of gentoo's emerge world failing all the time and installed Arch. I am really happy with it, but there were two things that needed improvement: wireless and cryptsetup initscripts. I built them, check them out (literaly) on svn://svn.cyb0rg.org/keks/archinit.
Wireless
First, copy wireless to /etc/rc.d/wireless. Then make a symlink from /etc/rc.d/wireless to /etc/rc.d/wireless.YourNetDevice, for instance:
# ln -s /etc/rc.d/wireless /etc/rc.d/wireless.ath0
Then start it by
# /etc/rc.d/wireless.ath0 start
You might need to set it executable
# chmod +x /etc/rc.d/wireless
Since he execuetes dhcpcd, the script takes some time to execute. So when adding to the startup stuff, you might want to start it in background:
#/etc/rc.conf
DAEMONS=(syslog-ng @wireless.ath0 @dbus ...)
Cryptsetup
Again, the gentoo-style symlink technique is used. Copy the mappings-file to /etc/rc.d/. If you want to map you device to /dev/mapper/docs, you add a symlink /etc/rc.d/mappings.docs:
# ln -s /etc/rc.d/mappings /etc/rc.d/mappings.docs
Then put the path of the device the is crypted into /etc/conf.d/mappings/docs. If you have a keyfile, put it to /etc/conf.d/mappins/docs.key, but make sure only root can read it. Don't forget to add an entry in the fstab, because the script will also attempt to mount the mapped volume. Add the mount option noauto, so he doesn't attempt to mount it on startup. Then start it by an
# /etc/rc.d/mappings.docs start
Well, that's all from me for taday, good night!