Is this possible?
The only thing that has been successful has been Arcana's StartupSound.prefpane, but I'd like to implement a solution that does not require extra software. I am however interested in what exactly that prefpane does, it must do something more than what I describe below.
I've tried the login/logout hook method through Terminal, which works for one boot, sometimes two, and then stops working. Code here if anyone can spot issues.
I've tried to figure out why it stops working. I've set chmod 777 on the two files, and their new permissions have stayed put. However the hooks just seem to stop working after one shutdown/startup cycle.
The other weird thing I found was, if I only set the "logout" hook (and restart a couple times so it fails to work as described above), the volume is still muted AFTER boot, which tells me that the hook is not actually working when it should (works on login rather than logout, which is useless).
Could the problem be that I'm using ctrl+alt+cmd+eject to shutdown? It is still a proper shutdown process - just ignores applications asking questions. FWIW, the Arcana prefpane works perfectly no matter how I shut down. I want to replicate its functionality with my own script.
Thanks
The only thing that has been successful has been Arcana's StartupSound.prefpane, but I'd like to implement a solution that does not require extra software. I am however interested in what exactly that prefpane does, it must do something more than what I describe below.
I've tried the login/logout hook method through Terminal, which works for one boot, sometimes two, and then stops working. Code here if anyone can spot issues.
I've tried to figure out why it stops working. I've set chmod 777 on the two files, and their new permissions have stayed put. However the hooks just seem to stop working after one shutdown/startup cycle.
The other weird thing I found was, if I only set the "logout" hook (and restart a couple times so it fails to work as described above), the volume is still muted AFTER boot, which tells me that the hook is not actually working when it should (works on login rather than logout, which is useless).
Could the problem be that I'm using ctrl+alt+cmd+eject to shutdown? It is still a proper shutdown process - just ignores applications asking questions. FWIW, the Arcana prefpane works perfectly no matter how I shut down. I want to replicate its functionality with my own script.
Thanks