From 4974f7941fa86bf37e7d04ef6e5c991b400d1e64 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9my=20Rosen?= Date: Mon, 16 Dec 2019 11:30:52 +0100 Subject: [PATCH] package/alsa-utils: add a WantedBy section to the systemd unit file MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This allows the user to enable/disable manually the unit. It is enabled by default Signed-off-by: Jérémy Rosen [yann.morin.1998@free.fr: - split logn lines - no need for continued line (no use for ';\' ) ] Signed-off-by: Yann E. MORIN --- package/alsa-utils/alsa-utils.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package/alsa-utils/alsa-utils.mk b/package/alsa-utils/alsa-utils.mk index 52022e32ab..2cd3c4a333 100644 --- a/package/alsa-utils/alsa-utils.mk +++ b/package/alsa-utils/alsa-utils.mk @@ -90,11 +90,12 @@ define ALSA_UTILS_INSTALL_INIT_SYSTEMD $(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service $(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-state.service \ $(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service - mkdir -p $(TARGET_DIR)/etc/systemd/system/sound.target.wants - ln -sf ../../../../lib/systemd/system/alsa-restore.service \ - $(TARGET_DIR)/etc/systemd/system/sound.target.wants/alsa-restore.service - ln -sf ../../../../lib/systemd/system/alsa-state.service \ - $(TARGET_DIR)/etc/systemd/system/sound.target.wants/alsa-state.service + mkdir $(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d + printf '[Install]\nWantedBy=multi-user.target\n' \ + >$(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service.d/buildroot-enable.conf + mkdir $(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d + printf '[Install]\nWantedBy=multi-user.target\n' \ + >$(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service.d/buildroot-enable.conf; endef endif -- 2.30.2