diff options
author | Eddy Petrisor <eddy@bounty.eddyp.homelinux.net> | 2007-06-25 21:49:46 +0300 |
---|---|---|
committer | Eddy Petrisor <eddy@bounty.eddyp.homelinux.net> | 2007-06-28 02:19:58 +0300 |
commit | 7b13e5fcacff359771f18e954da9bf9540b82eb6 (patch) | |
tree | aac58e519773f96e5146b773307e14bed7a7bae5 | |
parent | e4dc31110bf491251462a0b9db3584e91652388c (diff) | |
download | pbuilder-7b13e5fcacff359771f18e954da9bf9540b82eb6.tar pbuilder-7b13e5fcacff359771f18e954da9bf9540b82eb6.tar.gz |
saner way of modifying the conffile
-rwxr-xr-x | debian/pbuilder.postinst | 8 |
1 files changed, 4 insertions, 4 deletions
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 |