Changeset 57782e4 for debian


Ignore:
Timestamp:
2010-08-17T23:57:50Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
763a3ab
Parents:
5b94e9e
Message:

Alternative way for detecting upgrades: This should make sure that bitlbee
gets restarted, even when upgrading from versions that don't have a separate
-common package.

Location:
debian
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • debian/bitlbee-common.postinst

    r5b94e9e r57782e4  
    6464fi
    6565
    66 if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then
    67         invoke-rc.d bitlbee restart
     66# The official way to check if we're upgrading is to check if $2 is
     67# non-empty. However, previous versions of BitlBee didn't have a
     68# bitlbee-common package so in that case the var will also be empty.
     69# Instead, check if the port is in use (if netstat is available). This
     70# works since the debconf code will pick a free port on new installs.
     71if [ "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then
     72        unset IS_UPGRADE
     73        if type netstat > /dev/null 2> /dev/null; then
     74                netstat -an | grep -q :$PORT\\b.*LISTEN && IS_UPGRADE=1
     75        else
     76                [ -n "$2" ] && IS_UPGRADE=1
     77        fi
     78        if [ -n "$IS_UPGRADE" ]; then
     79                invoke-rc.d bitlbee restart
     80        fi
    6881fi
    6982
  • debian/changelog

    r5b94e9e r57782e4  
    1 bitlbee (1.3-1) unstable; urgency=low
     1bitlbee (1.3-0) unstable; urgency=low
    22
    33  * Setting some bogus version number, fix that later.
     
    66    bitlbee-common.
    77
    8  -- Wilmer van der Gaast <wilmer@gaast.net>  Sat, 05 Jun 2010 15:16:38 +0100
     8 -- Wilmer van der Gaast <wilmer@gaast.net>  Wed, 18 Aug 2010 00:53:11 +0100
    99
    1010bitlbee (1.2.8-1) unstable; urgency=low
Note: See TracChangeset for help on using the changeset viewer.