[Bug 1019] Restore ALSA volumes reliably when udev is installed
conathan at gmail.com
Wed Nov 10 12:21:56 PST 2004
On Wed, 10 Nov 2004 10:53:07 -0700 (MST),
blfs-bugs at linuxfromscratch.org <blfs-bugs at linuxfromscratch.org> wrote:
> ------- Additional Comments From bryan at kadzban.is-a-geek.net 2004-11-10 10:53 -------
> Could we create some sort of dual-dependency setup using hotplug and the dev.d
> directory? We'd create a dev.d handler for Alsa, and also a new
> /etc/hotplug/fsmounted.agent. Then udev would call our dev.d handler, and we
> could have the mountfs init script call the fsmounted.agent (with "/sbin/hotplug
> Both scripts would check for a "flag" file somewhere. (It will probably have to
> be on a ramfs.) If it does not exist, then this script is executing first, so
> it creates the flag file and exits. If the file does exist, then the script
> deletes the file and calls alsactl restore.
> There is a small race window between checking for the file's existence and
> creating it, but shell has no way to use O_CREAT | O_EXCL when opening files.
> We could write a short C program that would take a filename on its command line,
> open it with O_CREAT | O_EXCL, then exit(0) if successful, and exit(1) if not
> (there is no race condition this way). We could call that C program from each
> This works in all cases for factors 1 and 2 referenced above. In any case,
> alsactl restore is only called after the devices are created AND mountfs has run.
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
> You are the QA contact for the bug, or are watching the QA contact.
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
I think redhat has /var/lib/subsys, but I dont think it is mentioned
in any standards. I was thinking of doing something simular with
networking, where first /etc/rc.d/init.d/network would create
/var/lib/subsys/network, then create hotplug events for all the
network devices [coldplugging].
Unfortunately, I didn't find a suitable directory, and got yelled at
for even suggesting this
Nathan Coulson (conathan)
nathan at linuxfromscratch org
conathan at gmail com
More information about the blfs-book