This adds [Install] sections with WantedBy=sound.target to alsa-restore and
alsa-state service files, and removes the install-data-hook that manually
creates .wants/ symlinks. This lets distributions manage
enabling/disabling via a preset policy rather than hardwiring it at
install time.
Closes: https://github.com/alsa-project/alsa-utils/pull/329
Signed-off-by: Clayton Craft <clayton@craftyguy.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
conf/alsa-restore.service \
conf/alsa-card-wait@.service
-install-data-hook:
- $(MKDIR_P) -m 0755 \
- $(DESTDIR)$(systemdsystemunitdir)/sound.target.wants
- ( cd $(DESTDIR)$(systemdsystemunitdir)/sound.target.wants && \
- rm -f alsa-state.service alsa-restore.service && \
- $(LN_S) ../alsa-state.service alsa-state.service && \
- $(LN_S) ../alsa-restore.service alsa-restore.service)
-
endif
edit = \
RemainAfterExit=true
ExecStart=-@sbindir@/alsactl restore
ExecStop=-@sbindir@/alsactl store
+
+[Install]
+WantedBy=sound.target
Type=simple
ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon
ExecStop=-@sbindir@/alsactl -s kill save_and_quit
+
+[Install]
+WantedBy=sound.target