mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-08 22:05:41 +01:00
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>
This commit is contained in:
parent
8b34bf25c0
commit
c3a31afe14
6 changed files with 14 additions and 6 deletions
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
[Unit]
|
||||
Description=Store Sound Card State
|
||||
ConditionPathExists=!/etc/alsa/state-daemon.conf
|
||||
ConditionPathExists=!@daemonswitch@
|
||||
DefaultDependencies=no
|
||||
Before=shutdown.target
|
||||
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue