diff options
author | Daniel Baumann <daniel@debian.org> | 2009-01-16 15:48:01 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:09:40 +0100 |
commit | e51e734b00bb75a9bf2eb84559bb852e13589246 (patch) | |
tree | b9cebb5b70855176620e704fb2217e8b7ed43618 | |
parent | 304e0fce7fdd06396c57eeabbb46bb714605627c (diff) | |
download | vyos-live-build-e51e734b00bb75a9bf2eb84559bb852e13589246.tar.gz vyos-live-build-e51e734b00bb75a9bf2eb84559bb852e13589246.zip |
If config.cfg is executable, we execute it and accept its output as extra arguments. This makes dynamic configuration possible.
-rwxr-xr-x | helpers/lh_config | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/helpers/lh_config b/helpers/lh_config index 2cb11268a..c2137ad6e 100755 --- a/helpers/lh_config +++ b/helpers/lh_config @@ -714,13 +714,16 @@ fi # Reading existing configuration Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source -if [ -e config.cfg ] +if [ -x config.cfg ] then - Local_arguments $(cat config.cfg) "${@}" -else - Local_arguments "${@}" + EXTRA_ARGUMENTS="./config.cfg" +elif [ -r config.cfg ] +then + EXTRA_ARGUMENTS="$(cat config.cfg)" fi +Local_arguments ${EXTRA_ARGUMENTS} "${@}" + if [ -n "${_CONFFILE}" ] then Read_conffiles "${_CONFFILE}" |