[Pkg-alsa-devel] New alsactl initscript?
Thomas Hood
jdthood@aglu.demon.nl
Wed, 08 Sep 2004 12:36:53 +0200
/etc/init.d/alsa does "alsactl store" in the stop method
provided $alsactl_store_on_shutdown is set appropriately
and the previous runlevel number matches the pattern
$runlevels_save.
There is a cleaner way to accomplish the same ends. Create
a new initscript /etc/init.d/alsactl which does "alsactl store"
in its start method provided it isn't in runlevel S. Set it up
so that it is S in runlevels S, 1, 0 and 6, and K in runlevels
2 through 5. The init system only runs start methods on a
transition to S; therefore, "/etc/init.d/alsactl start" will
only happen in S and when switching from one of the runlevels
{2..5} to one of the runlevels {0,1,6}.
In this system the administrator controls when "alsactl store"
is run by changing the status of the "alsactl" service in the
various runlevels.
With this implemented we can eliminate both of the aforementioned
environment variables and all symlinks to /etc/init.d/alsa.
(We can leave the alsa initscript around so that people can use
its force-stop method if they need to.) We can also chop the
related questions out of debconf.
--
Thomas Hood