Bug 673513 - /etc/rc.d/init.d/halt script - change asound.state path for the alsactl store call
Summary: /etc/rc.d/init.d/halt script - change asound.state path for the alsactl store...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-28 14:06 UTC by Jaroslav Kysela
Modified: 2014-03-17 03:26 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-28 14:27:33 UTC
Type: ---


Attachments (Terms of Use)
Proposed patch for /etc/rc.d/init.d/halt script (526 bytes, patch)
2011-01-28 14:07 UTC, Jaroslav Kysela
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.