summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Amadori <marco.amadori@gmail.com>2008-05-16 23:52:02 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:34 +0100
commit80a2f25b028c28c14ed800c5c63734fa605bbfba (patch)
tree95157b36af4fb7779238262c4bef2f02bf315d89
parent2b287d6b6cc834a6e326a73752e53e09c1dea2b5 (diff)
downloadlive-build-80a2f25b028c28c14ed800c5c63734fa605bbfba.zip
live-build-80a2f25b028c28c14ed800c5c63734fa605bbfba.tar.gz
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.
-rwxr-xr-xhelpers/lh_config7
-rw-r--r--manpages/lh_config.en.16
2 files changed, 13 insertions, 0 deletions
diff --git a/helpers/lh_config b/helpers/lh_config
index 85d3134..6fa2ad6 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}"
diff --git a/manpages/lh_config.en.1 b/manpages/lh_config.en.1
index d7dbef4..d7fd733 100644
--- a/manpages/lh_config.en.1
+++ b/manpages/lh_config.en.1
@@ -278,6 +278,12 @@ All command line switches can also be specified through the corresponding
environment variable. Environment variables are name LH_FOO, means, e.g.
\-\-apt\-ftp\-proxy becomes LH_APT_FTP_PROXY.
+.SH FILES
+.I /etc/live-helper
+.PP
+An optional conffile for lh_config defaults, useful to specify a few system wide defaults, like
+LH_MIRROR_BOOTSTRAP.
+
.SH SEE ALSO
\fIlive\-helper\fR(7)
.PP