aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-10-22 23:39:46 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2007-10-22 23:39:46 +0100
commit7448e1bdb7ea75ed8a845816bd2f6bc76ce43785 (patch)
treeacf7487275c6c0faba04f44d8aca31dc7426a8ae
parent3933853e12f9f4271c33e68425c3cc4d0aa53728 (diff)
debian/ specific: Changed "rm help.txt at upgrade" hack to not remove the
file but rename it and rename it back in postinst in case we were doing a dpkg-reconfigure instead of an upgrade.
-rwxr-xr-xdebian/postinst9
-rwxr-xr-xdebian/prerm9
2 files changed, 16 insertions, 2 deletions
diff --git a/debian/postinst b/debian/postinst
index 6c99c40d..37608e47 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -45,6 +45,15 @@ EOF
## Bye-bye DebConf, we don't need you anymore.
db_stop
+## Restore the helpfile in case we weren't upgrading but just reconfiguring:
+if [ -e /usr/share/bitlbee/help.upgrading ]; then
+ if [ -e /usr/share/bitlbee/help.txt ]; then
+ rm -f /usr/share/bitlbee/help.upgrading
+ else
+ mv /usr/share/bitlbee/help.upgrading /usr/share/bitlbee/help.txt
+ fi
+fi
+
if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then
/etc/init.d/bitlbee restart
fi
diff --git a/debian/prerm b/debian/prerm
index c02b13f4..5272e273 100755
--- a/debian/prerm
+++ b/debian/prerm
@@ -1,8 +1,13 @@
#!/bin/sh -e
if [ "$1" = "upgrade" ]; then
- ## To prevent the help function from breaking in currently running BitlBee processes
- rm -f /usr/share/bitlbee/help.txt
+ ## To prevent the help function from breaking in currently running
+ ## BitlBee processes. Have to do it like this because dpkg-reconfigure
+ ## looks a lot like an upgrade and we don't want to lose help.txt...
+ if [ -e /usr/share/bitlbee/help.txt ]; then
+ rm -f /usr/share/bitlbee/help.upgrading
+ mv /usr/share/bitlbee/help.txt /usr/share/bitlbee/help.upgrading
+ fi
else
/etc/init.d/bitlbee stop || exit 0
fi