Due to a bug in Debian Sid I'm currently having to run "alsactl init" at the command-line to start my sound card. This wasn't a big issue, but I though automating this simple task at boot would be more efficient. I made the following script in /etc/init.d/ and ran chmod +x on it:
root@me:/etc/init.d# cat atboot.sh
#!/bin/bash
alsactl init
echo "All your base belong to us..."
We my system boots up I see the test string being echoed "All your base belong to us...". However, the sound does not start and I have to run "alsactl init" again from the command-line to start sound. Does anyone know anything I may be missing?
Ok, I know how to send stderr to a file with this but how would one make a script execute toward the end of the boot process? Not sure how to specify that.
I have been doing a bit of lateral thinking here and came up with an idea...
You say that you enable alsa at the command line so I assume a terminal rather than
a console.
Maybe your script to enable alsa requires a small delay inside a terminal to do its job.
(I once had a similar problem with Caldera 7 and had to use a batch file from a Windows
boot to enable the sound card before LinLoad.)
Why not try this idea out, assuming you have xterm:-