aboutsummaryrefslogtreecommitdiffstats
path: root/debian/postinst
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-03-23 21:53:53 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2008-03-23 21:53:53 +0000
commitfcd5003bd6c10f176f63df459e8ca479c5292dc1 (patch)
tree2a384a80b1e1d54582ad0cb7608c3eb0c29aa64d /debian/postinst
parentdd14ecc29b87b9aefa97b6838f5a8595557d46d1 (diff)
Some Debian package fixes. If nothing else comes up, this will be 1.2-2.
(Not sure if I will roll back the non-Debian changes...)
Diffstat (limited to 'debian/postinst')
-rwxr-xr-xdebian/postinst10
1 files changed, 6 insertions, 4 deletions
diff --git a/debian/postinst b/debian/postinst
index c4edb8e8..1a906474 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -13,17 +13,19 @@ update-rc.d bitlbee defaults > /dev/null 2>&1
BITLBEE_OPTS=-F
BITLBEE_DISABLED=0
BITLBEE_UPGRADE_DONT_RESTART=0
-[ -r /etc/default/bitlbee ] && source /etc/default/bitlbee
+[ -r /etc/default/bitlbee ] && . /etc/default/bitlbee
-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)
+if [ "$BITLBEE_DISABLED" = "0" ] && type update-inetd > /dev/null 2> /dev/null &&
+ ( expr "$2" : '0\..*' > /dev/null || expr "$2" : '1\.0\..*' > /dev/null ); then
+ ## Make sure the inetd entry is gone (can still be there from a
+ ## previous version.
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
+ killall -HUP inetd || true
fi
fi