diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in index c68119d..80fc043 100644 --- a/alsactl/90-alsa-restore.rules.in +++ b/alsactl/90-alsa-restore.rules.in @@ -1,4 +1,4 @@ -ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO="alsa_restore_go" +ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", TEST=="@sbindir@", TEST=="@datadir@", GOTO="alsa_restore_go" GOTO="alsa_restore_end" LABEL="alsa_restore_go" diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am index b862412..afbedb3 100644 --- a/alsactl/Makefile.am +++ b/alsactl/Makefile.am @@ -44,6 +44,7 @@ endif edit = \ $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \ + -e 's,@datadir\@,$(mydatadir),g' \ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \ < $< > $@ || rm $@ diff --git a/configure.ac b/configure.ac index 0c98a4f..d169adb 100644 --- a/configure.ac +++ b/configure.ac @@ -292,6 +292,7 @@ AC_DEFINE_UNQUOTED(SOUNDSDIR, "$soundsdir", [directory containing sample data]) mydatadir="$dir/alsa" AC_DEFINE_UNQUOTED(DATADIR, "$mydatadir", [directory containing alsa configuration]) +AC_SUBST(mydatadir) AC_ARG_WITH(testsound, AS_HELP_STRING([--with-testsound=file], [give the path of test sound file for alsaconf]),