summaryrefslogtreecommitdiff
path: root/helpers/lh_config
diff options
context:
space:
mode:
authorMarco Amadori <marco.amadori@gmail.com>2008-05-16 23:52:02 +0200
committerMarco Amadori <amadorim@vdavda.com>2008-06-09 08:52:45 +0200
commit4e18008ecb95c93321f7bd08667864331b909a45 (patch)
tree95157b36af4fb7779238262c4bef2f02bf315d89 /helpers/lh_config
parent60c755e5089a8ac0c425f1f345ed39984eb4037b (diff)
downloadvyos-live-build-4e18008ecb95c93321f7bd08667864331b909a45.tar.gz
vyos-live-build-4e18008ecb95c93321f7bd08667864331b909a45.zip
Added support for /etc/live-helper.
* lh_config system-wide configuration file, like an implicit specification of '--conffile=/etc/live-helper' to each lh_config call. Signed-off-by: Marco Amadori <marco.amadori@gmail.com>
Diffstat (limited to 'helpers/lh_config')
-rwxr-xr-xhelpers/lh_config7
1 files changed, 7 insertions, 0 deletions
diff --git a/helpers/lh_config b/helpers/lh_config
index 85d313430..6fa2ad6f7 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -18,6 +18,7 @@ do
done
# Setting static variables
+SYSTEM_LH_CONFFILE="/etc/live-helper"
DESCRIPTION="create configuration for live-helper(7)"
HELP="FIXME"
USAGE="${PROGRAM} [--apt apt|aptitude]\n\
@@ -660,6 +661,12 @@ Local_arguments "${@}"
# Setting defaults
Set_defaults
+if [ -f "${SYSTEM_LH_CONFFILE}" ]
+then
+ Echo_verbose "Using system defaults from ${SYSTEM_LH_CONFFILE}"
+ Read_conffile "${SYSTEM_LH_CONFFILE}"
+fi
+
if [ -n "${LH_CONFFILE}" ]
then
Read_conffile "${LH_CONFFILE}"