diff --git a/lib/config b/lib/config index 552aeb0ad1..67d788ccba 100644 --- a/lib/config +++ b/lib/config @@ -82,8 +82,6 @@ function merge_config_file { local matchgroup=$2 local configfile=$3 - [[ -r $configfile ]] || touch $configfile - get_meta_section $file $matchgroup $configfile | \ $CONFIG_AWK_CMD -v configfile=$configfile ' BEGIN { section = "" } @@ -114,7 +112,7 @@ function merge_config_group { for group in $matchgroups; do for configfile in $(get_meta_section_files $localfile $group); do - if [[ -d $(dirname $configfile) ]]; then + if [[ -d $(dirname $(eval "echo $configfile")) ]]; then merge_config_file $localfile $group $configfile fi done diff --git a/tests/test_config.sh b/tests/test_config.sh index 5700f8df29..2634ce0654 100755 --- a/tests/test_config.sh +++ b/tests/test_config.sh @@ -42,6 +42,17 @@ type=original EOF } +function setup_test4 { + mkdir -p test-etc + cat >test-etc/test4.conf <test.conf <