From 7b13e5fcacff359771f18e954da9bf9540b82eb6 Mon Sep 17 00:00:00 2001 From: Eddy Petrisor Date: Mon, 25 Jun 2007 21:49:46 +0300 Subject: saner way of modifying the conffile --- debian/pbuilder.postinst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'debian/pbuilder.postinst') diff --git a/debian/pbuilder.postinst b/debian/pbuilder.postinst index c3f6ac1..2eb3075 100755 --- a/debian/pbuilder.postinst +++ b/debian/pbuilder.postinst @@ -25,15 +25,15 @@ case "$1" in CONFFILE=/etc/pbuilderrc + # if there is a custom file, then we shouldn't touch it + CURRENTMIRROR=$(grep -E "MIRRORSITE=" "$CONFFILE" | sed 's#MIRRORSITE=##g') + [ "$CURRENTMIRROR" = "_" ] || exit 0 + db_get pbuilder/mirrorsite MIRRORSITE="$RET" if [ "$MIRRORSITE" = "_" ] then - # if there is a custom file, then we shouldn't touch it - CURRENTMIRROR=$(grep -E "MIRRORSITE=" "$CONFFILE" | sed 's#MIRRORSITE=##g') - [ "$CURRENTMIRROR" = "_" ] || exit 0 - MIRRORSITE=$(grep -E '^deb ' /etc/apt/sources.list | head -n 1 | awk '{print $2;}') db_set pbuilder/mirrorsite "$MIRRORSITE" db_input medium pbuilder/mirrorsite || true -- cgit v1.2.3