From 705a4178e75ffc190acf2fa914a6cd1519fdae87 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 7 Apr 2008 12:01:37 +0200 Subject: Centraly evaluate LH_CONFIG for custom configuration file. --- functions/conffile.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/functions/conffile.sh b/functions/conffile.sh index e36584a..17121b8 100755 --- a/functions/conffile.sh +++ b/functions/conffile.sh @@ -11,10 +11,15 @@ set -e Read_conffile () { - FILES="${1} ${1}.${LH_ARCHITECTURE} ${1}.${DISTRIBUTION}" - FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||')" - FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${ARCHITECTURE}" - FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${DISTRIBUTION}" + if [ -n "${LH_CONFIG}" ] + then + FILES="${LH_CONFIG}" + else + FILES="${1} ${1}.${LH_ARCHITECTURE} ${1}.${DISTRIBUTION}" + FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||')" + FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${ARCHITECTURE}" + FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${DISTRIBUTION}" + fi for FILE in ${FILES} do -- cgit v1.0