Extending conffiles to allow config/., config/., as well as config/, config/. and config/..

This commit is contained in:
Daniel Baumann 2007-11-13 21:09:34 +01:00
parent e40202da69
commit 3773ed2765
1 changed files with 15 additions and 9 deletions

View File

@ -11,8 +11,13 @@ set -e
Read_conffile ()
{
FILE="${1}"
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}"
for FILE in ${FILES}
do
if [ -f "${FILE}" ]
then
if [ -r "${FILE}" ]
@ -23,4 +28,5 @@ Read_conffile ()
Echo_warning "Failed to read configuration file ${FILE}"
fi
fi
done
}