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:
Eelco Dolstra 2013-09-22 21:31:38 +02:00
parent f19065c283
commit d94aa36f1e

View File

@ -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";
};
};
};