aboutsummaryrefslogtreecommitdiffstats
path: root/debian/postinst
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-03-21 00:27:24 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2008-03-21 00:27:24 +0000
commit379c08a27e637dbcbbe3f39a8723daa765ad0e48 (patch)
treebadcaf8eb6541af7c2ff05efa8b0508372c92180 /debian/postinst
parent6612cc9dd32475569875030f5acc7cc4b0374ba6 (diff)
Updated/Fixed Debian package.1.2-1
Diffstat (limited to 'debian/postinst')
-rwxr-xr-xdebian/postinst9
1 files changed, 8 insertions, 1 deletions
diff --git a/debian/postinst b/debian/postinst
index 37608e47..c4edb8e8 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -15,9 +15,16 @@ BITLBEE_DISABLED=0
BITLBEE_UPGRADE_DONT_RESTART=0
[ -r /etc/default/bitlbee ] && source /etc/default/bitlbee
-if [ "$BITLBEE_DISABLED" = "0" ]; then
+if [ "$BITLBEE_DISABLED" = "0" ] && expr "$2" : '0\..*' > /dev/null || expr "$2" : '1\.0\..*' > /dev/null; then
## In case it's still there (if we're upgrading right now)
update-inetd --remove '.*/usr/sbin/bitlbee'
+ if grep -q /usr/sbin/bitlbee /etc/inetd.conf 2> /dev/null; then
+ # Thanks for breaking update-inetd! (bugs.debian.org/311111)
+ # I hope that it works at least with xinetd, because this
+ # emergency hack doesn't:
+ perl -pi -e 's:^[^#].*/usr/sbin/bitlbee$:## Now using daemon mode\: # $&:' /etc/inetd.conf
+ killall -HUP inetd
+ fi
fi
cat<<EOF>/etc/default/bitlbee