diff --git a/ChangeLog b/ChangeLog index de080f1..181dba9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,11 @@ Changes in version 1.14.3 * pck-update - Davide Madrisan: Fix a string translation by adding the missing '$' prefix. ++ improvement + * libcfg.lib, plugins/config-getvar - Davide Madrisan: + Option '-C|--config': accept a list of configuration files containing + wilcards. + ------------------------------------------------------------------------------- Changes in version 1.14.2 diff --git a/lib/libcfg.lib.in b/lib/libcfg.lib.in index 083b333..88b8353 100644 --- a/lib/libcfg.lib.in +++ b/lib/libcfg.lib.in @@ -106,7 +106,7 @@ function cfg_load_files() { if [ "$1" ]; then # select a different list of user configuration files cfgfile_list=(\ -`ls /etc/@package@.conf /etc/@package@.d/*.conf` $1) +`ls /etc/@package@.conf /etc/@package@.d/*.conf $1 2>/dev/null`) else # default configuration files cfgfile_list=(${default_cfg_list[@]}) diff --git a/plugins/config-getvar.in b/plugins/config-getvar.in index 372f340..623cc5f 100644 --- a/plugins/config-getvar.in +++ b/plugins/config-getvar.in @@ -145,9 +145,11 @@ function config.getvar() { local cfg_file_lst if [ "$cfg_file" ]; then - [ -r $cfg_file ] || - notify.error $"configuration file not found"" -- \`$cfg_file'" - cfg_file_lst="$cfg_file" + for f in $(ls $cfg_file 2>/dev/null); do + [ -r "$f" ] || + notify.error $"configuration file not found"" -- \`$f'" + done + cfg_file_lst="$(ls $cfg_file 2>/dev/null)" else cfg_file_lst="${default_cfg_list[*]}" fi