Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | [PATCH] assume storing is success if not sound card device |
| 2 | |
| 3 | Upstream-Statue: Pending |
| 4 | |
| 5 | Systemd will report failure when run alsa-*, if the machine has not the |
| 6 | sound card. To void this annoyed message, alsa-restore/alsa-state ignore |
| 7 | all the exit codes by prefixing "-" in ExecStart, like: |
| 8 | |
| 9 | alsa-utils-1.0.29$ grep "=-" ./ -r|grep service.in |
| 10 | ./alsactl/alsa-restore.service.in:ExecStart=-@sbindir@/alsactl restore |
| 11 | ./alsactl/alsa-state.service.in:ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon |
| 12 | ./alsactl/alsa-state.service.in:ExecStop=-@sbindir@/alsactl -s kill save_and_quit |
| 13 | lsa-utils-1.0.29$ |
| 14 | |
| 15 | But alsa-store.service.in is missing, and better solution is to ignore |
| 16 | the exit code 19 which means not sound card device, not all exit code |
| 17 | |
| 18 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
| 19 | --- |
| 20 | alsactl/alsa-store.service.in | 1 + |
| 21 | 1 file changed, 1 insertion(+) |
| 22 | |
| 23 | diff --git a/alsactl/alsa-store.service.in b/alsactl/alsa-store.service.in |
| 24 | index f1a56bb..68ca529 100644 |
| 25 | --- a/alsactl/alsa-store.service.in |
| 26 | +++ b/alsactl/alsa-store.service.in |
| 27 | @@ -13,3 +13,4 @@ Before=shutdown.target |
| 28 | Type=oneshot |
| 29 | ExecStart=@sbindir@/alsactl store |
| 30 | StandardOutput=syslog |
| 31 | +SuccessExitStatus=0 19 |
| 32 | -- |
| 33 | 1.9.1 |
| 34 | |