diff options
author | Colin Guthrie <colin@mageia.org> | 2011-09-16 10:04:26 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-09-20 09:28:46 +0200 |
commit | 7924500688fdfeac71e5968e5f5875726a8dce14 (patch) | |
tree | 9bcba7bb1e6f8ff1c8cf007d6083be7e4600bbcc /src/conf | |
parent | 26e80c2e32bd3a088b56a6ea4e30d5b8ccce9112 (diff) |
conf: Allow for a directory to be given as a config file.
When this is done, *.conf files can be placed in that directory and they
will be processed by as if they were included directly.
A directory (typically /usr/share/alsa/alsa.conf.d/) has been
added into the distribution.
v2: Used existing conf syntax rather than processing via autotools
v3: Split file loading into separate function and made error handling
more consistent.
Signed-off-by: Colin Guthrie <colin@mageia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'src/conf')
-rw-r--r-- | src/conf/Makefile.am | 2 | ||||
-rw-r--r-- | src/conf/alsa.conf | 7 | ||||
-rw-r--r-- | src/conf/alsa.conf.d/Makefile.am | 8 | ||||
-rw-r--r-- | src/conf/alsa.conf.d/README | 2 |
4 files changed, 18 insertions, 1 deletions
diff --git a/src/conf/Makefile.am b/src/conf/Makefile.am index 2e5d0bf5..456454f6 100644 --- a/src/conf/Makefile.am +++ b/src/conf/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS=cards pcm +SUBDIRS=cards pcm alsa.conf.d cfg_files = alsa.conf if BUILD_ALISP diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf index a33c24e7..bc91df3b 100644 --- a/src/conf/alsa.conf +++ b/src/conf/alsa.conf @@ -8,6 +8,13 @@ { func load files [ + { + @func concat + strings [ + { @func datadir } + "/alsa.conf.d/" + ] + } "/etc/asound.conf" "~/.asoundrc" ] diff --git a/src/conf/alsa.conf.d/Makefile.am b/src/conf/alsa.conf.d/Makefile.am new file mode 100644 index 00000000..c91661e9 --- /dev/null +++ b/src/conf/alsa.conf.d/Makefile.am @@ -0,0 +1,8 @@ +alsaconfigdir = @ALSA_CONFIG_DIR@ +alsadir = $(alsaconfigdir)/alsa.conf.d +cfg_files = README + +alsa_DATA = $(cfg_files) + +EXTRA_DIST = \ + $(cfg_files) diff --git a/src/conf/alsa.conf.d/README b/src/conf/alsa.conf.d/README new file mode 100644 index 00000000..99978848 --- /dev/null +++ b/src/conf/alsa.conf.d/README @@ -0,0 +1,2 @@ +You can place files named *.conf in this folder and they will be processed +when initialising alsa-lib. |