[SCM] debian-live/live-helper branch, master, updated. 1.0_a36-1-6-g3773ed2

Daniel Baumann daniel at debian.org
Tue Nov 13 20:09:59 UTC 2007


The branch, master has been updated
       via  3773ed2765a5766c8bb4135864b391a067143dc5 (commit)
      from  e40202da696a40101af630d612b83f691b915d8e (commit)


- Shortlog ------------------------------------------------------------
3773ed2 Extending conffiles to allow config/., config/., as well as config/, config/. and config/..

Summary of changes:
 functions/conffile.sh |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit 3773ed2765a5766c8bb4135864b391a067143dc5
Author: Daniel Baumann <daniel at debian.org>
Date:   Tue Nov 13 21:09:34 2007 +0100

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

diff --git a/functions/conffile.sh b/functions/conffile.sh
index bd5547e..f60abe2 100755
--- a/functions/conffile.sh
+++ b/functions/conffile.sh
@@ -11,16 +11,22 @@ 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}"
 
-	if [ -f "${FILE}" ]
-	then
-		if [ -r "${FILE}" ]
+	for FILE in ${FILES}
+	do
+		if [ -f "${FILE}" ]
 		then
-			Echo_debug "Reading configuration file ${FILE}"
-			. "${FILE}"
-		else
-			Echo_warning "Failed to read configuration file ${FILE}"
+			if [ -r "${FILE}" ]
+			then
+				Echo_debug "Reading configuration file ${FILE}"
+				. "${FILE}"
+			else
+				Echo_warning "Failed to read configuration file ${FILE}"
+			fi
 		fi
-	fi
+	done
 }

-- 
debian-live/live-helper



More information about the debian-live-changes mailing list