Allowing multiple arguments for Read_conffile();.
This commit is contained in:
parent
705a4178e7
commit
0466a3bda4
|
@ -15,22 +15,25 @@ Read_conffile ()
|
||||||
then
|
then
|
||||||
FILES="${LH_CONFIG}"
|
FILES="${LH_CONFIG}"
|
||||||
else
|
else
|
||||||
FILES="${1} ${1}.${LH_ARCHITECTURE} ${1}.${DISTRIBUTION}"
|
for FILE in ${@}
|
||||||
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||')"
|
do
|
||||||
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${ARCHITECTURE}"
|
FILES="${FILE} ${FILE}.${LH_ARCHITECTURE} ${FILE}.${DISTRIBUTION}"
|
||||||
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${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}"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for FILE in ${FILES}
|
for CONFFILE in ${FILES}
|
||||||
do
|
do
|
||||||
if [ -f "${FILE}" ]
|
if [ -f "${CONFFILE}" ]
|
||||||
then
|
then
|
||||||
if [ -r "${FILE}" ]
|
if [ -r "${CONFFILE}" ]
|
||||||
then
|
then
|
||||||
Echo_debug "Reading configuration file ${FILE}"
|
Echo_debug "Reading configuration file ${CONFFILE}"
|
||||||
. "${FILE}"
|
. "${CONFFILE}"
|
||||||
else
|
else
|
||||||
Echo_warning "Failed to read configuration file ${FILE}"
|
Echo_warning "Failed to read configuration file ${CONFFILE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue