diff options
author | Jaroslav Kysela <perex@perex.cz> | 2013-04-10 11:08:47 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2013-04-10 11:08:47 +0200 |
commit | c3a31afe143a51f342cf6aacf71802b5f20f7aa2 (patch) | |
tree | 059f1eedba7f785cf71e3152a3afff7a27eac992 | |
parent | 8b34bf25c02693899b03768b0eef628eb1d7bb6e (diff) |
alsactl: add --with-alsactl-daemonswitch=FILE to the global configure.in
It may be useful to have the file location configurable.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r-- | alsactl/90-alsa-restore.rules.in | 4 | ||||
-rw-r--r-- | alsactl/Makefile.am | 4 | ||||
-rw-r--r-- | alsactl/alsa-restore.service.in | 2 | ||||
-rw-r--r-- | alsactl/alsa-state.service.in | 2 | ||||
-rw-r--r-- | alsactl/alsa-store.service.in | 2 | ||||
-rw-r--r-- | configure.in | 6 |
6 files changed, 14 insertions, 6 deletions
diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in index 3ce9a65..88e12e0 100644 --- a/alsactl/90-alsa-restore.rules.in +++ b/alsactl/90-alsa-restore.rules.in @@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO=" GOTO="alsa_restore_end" LABEL="alsa_restore_go" -TEST!="/etc/alsa/state-daemon.conf", RUN+="@sbindir@/alsactl restore $attr{number}" -TEST=="/etc/alsa/state-daemon.conf", RUN+="@sbindir@/alsactl nrestore $attr{number}" +TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl restore $attr{number}" +TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl nrestore $attr{number}" LABEL="alsa_restore_end" diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am index dbc00f1..b644210 100644 --- a/alsactl/Makefile.am +++ b/alsactl/Makefile.am @@ -36,7 +36,9 @@ install-data-hook: endif edit = \ - $(SED) -r 's,@sbindir\@,$(sbindir),g' < $< > $@ || rm $@ + $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \ + -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ + < $< > $@ || rm $@ alsa-state.service: alsa-state.service.in $(edit) diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in index a0d752c..ab3c30d 100644 --- a/alsactl/alsa-restore.service.in +++ b/alsactl/alsa-restore.service.in @@ -5,7 +5,7 @@ [Unit] Description=Restore Sound Card State -ConditionPathExists=!/etc/alsa/state-daemon.conf +ConditionPathExists=!@daemonswitch@ DefaultDependencies=no After=alsa-state.service Before=shutdown.target diff --git a/alsactl/alsa-state.service.in b/alsactl/alsa-state.service.in index 94d138b..768c5a8 100644 --- a/alsactl/alsa-state.service.in +++ b/alsactl/alsa-state.service.in @@ -5,7 +5,7 @@ [Unit] Description=Manage Sound Card State (restore and store) -ConditionPathExists=/etc/alsa/state-daemon.conf +ConditionPathExists=@daemonswitch@ DefaultDependencies=no After=sysinit.target Before=shutdown.target diff --git a/alsactl/alsa-store.service.in b/alsactl/alsa-store.service.in index b2e0ac9..f1a56bb 100644 --- a/alsactl/alsa-store.service.in +++ b/alsactl/alsa-store.service.in @@ -5,7 +5,7 @@ [Unit] Description=Store Sound Card State -ConditionPathExists=!/etc/alsa/state-daemon.conf +ConditionPathExists=!@daemonswitch@ DefaultDependencies=no Before=shutdown.target diff --git a/configure.in b/configure.in index bcb5321..aca2b79 100644 --- a/configure.in +++ b/configure.in @@ -328,6 +328,12 @@ AC_ARG_WITH([alsactl-pidfile-dir], [ALSACTL_PIDFILE_DIR="/var/run"]) AC_SUBST(ALSACTL_PIDFILE_DIR) +AC_ARG_WITH([alsactl-daemonswitch], + AS_HELP_STRING([--with-alsactl-daemonswitch=FILE], [File to test for the daemon mode]), + [ALSACTL_DAEMONSWITCH="$withval"], + [ALSACTL_DAEMONSWITCH="/etc/alsa/state-daemon.conf"]) +AC_SUBST(ALSACTL_DAEMONSWITCH) + AC_OUTPUT(Makefile alsactl/Makefile alsactl/init/Makefile \ alsamixer/Makefile amidi/Makefile amixer/Makefile \ m4/Makefile po/Makefile.in \ |