Bug 673513

Summary: /etc/rc.d/init.d/halt script - change asound.state path for the alsactl store call
Product: [Fedora] Fedora Reporter: Jaroslav Kysela <jkysela>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: iarlyy, initscripts-maint-list, jonathan, lnykryn, lpoetter, notting, plautrba, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-28 14:27:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Proposed patch for /etc/rc.d/init.d/halt script none

Description Jaroslav Kysela 2011-01-28 14:06:19 UTC
The latest alsactl utility alsa-utils 1.0.24 uses /var/lib/alsa/asound.state file instead /etc/asound.state file to store soundcard state. Modify /etc/rc.d/init.d/halt script to reflect this change.

Also, it may be considered to not store the soundcard's configuration when the lib/systemd/system/shutdown.target.wants/alsa-store.service is ran to avoid double store processing. But I'm not expert on systemd to propose a solid solution.

Comment 1 Jaroslav Kysela 2011-01-28 14:07:05 UTC
Created attachment 475810 [details]
Proposed patch for /etc/rc.d/init.d/halt script

Comment 2 Jaroslav Kysela 2011-01-28 14:10:09 UTC
Adding CC to Lennart to comment the possible systemd issue.

Comment 3 Bill Nottingham 2011-02-01 17:43:25 UTC
The halt initscript isn't run when systemd is active.

Why would alsa-utils change locations? Especially to one that isn't necessarily available on boot when this would be restored?

Comment 4 Jaroslav Kysela 2011-02-03 13:15:05 UTC
The change was introduced by Lennart:

"""
Lennart Poettering [Tue, 23 Nov 2010 01:59:18 +0000 (02:59 +0100)]

.... and add configure switch for it.

/etc might be on a read-only partition which is not suitable for dynamic
data such as the mixer settings. Hence move the location of asound.state
to /var/lib.

This is based on a patch from Ubuntu/Debian which hardcoded the pah in
/var/lib.
"""

http://git.alsa-project.org/?p=alsa-utils.git;a=commitdiff;h=81f015f5abdd8e6cfa75e37bd97eb22781019eec

I can configure the alsa-utils package for Fedora to use back the /etc location. We just need to settle our preferred location for this file.

The soundcard settings is restored using the udev rules.

Comment 5 Bill Nottingham 2011-02-03 16:45:50 UTC
/var is not necessarily available when udev rules run, though.

Comment 6 Lennart Poettering 2011-02-18 18:15:19 UTC
I think this can be closed now. alsa-utils now comes with native systemd unit files which get this right. The old halt script is obsolete and not used anymore.

Comment 7 Bill Nottingham 2011-02-21 16:58:55 UTC
Are the udev rules not used any more as well?

If so, it's probably OK. But then this alsa change shouldn't be backported to prior releases.