Fix saving the ALSA sound card state
This didn't work reliably because it raced with the remounting of /. So if you were unlucky, then / was read-only by the time we ran "alsactl store". Now the sound card state is saved before anything is unmounted/remounted.
This commit is contained in:
parent
f19065c283
commit
d94aa36f1e
@ -52,12 +52,14 @@ in
|
||||
|
||||
systemd.services."alsa-store" =
|
||||
{ description = "Store Sound Card State";
|
||||
wantedBy = [ "shutdown.target" ];
|
||||
before = [ "shutdown.target" ];
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.ExecStart = "${alsaUtils}/sbin/alsactl store --ignore";
|
||||
serviceConfig.ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /var/lib/alsa";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
unitConfig.RequiresMountsFor = "/var/lib/alsa";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "${pkgs.coreutils}/bin/mkdir -p /var/lib/alsa";
|
||||
ExecStop = "${alsaUtils}/sbin/alsactl store --ignore";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user