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" =
|
systemd.services."alsa-store" =
|
||||||
{ description = "Store Sound Card State";
|
{ description = "Store Sound Card State";
|
||||||
wantedBy = [ "shutdown.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
before = [ "shutdown.target" ];
|
unitConfig.RequiresMountsFor = "/var/lib/alsa";
|
||||||
unitConfig.DefaultDependencies = "no";
|
serviceConfig = {
|
||||||
serviceConfig.Type = "oneshot";
|
Type = "oneshot";
|
||||||
serviceConfig.ExecStart = "${alsaUtils}/sbin/alsactl store --ignore";
|
RemainAfterExit = true;
|
||||||
serviceConfig.ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /var/lib/alsa";
|
ExecStart = "${pkgs.coreutils}/bin/mkdir -p /var/lib/alsa";
|
||||||
|
ExecStop = "${alsaUtils}/sbin/alsactl store --ignore";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user