Changeset 7a3d2c7 for debian


Ignore:
Timestamp:
2017-01-02T06:44:38Z (2 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
73e2b69
Parents:
8768f67
git-author:
dequis <dx@…> (01-01-17 22:40:09)
git-committer:
dequis <dx@…> (02-01-17 06:44:38)
Message:

debian: drop support for /etc/default/bitlbee

It was broken with the transition to systemd and doesn't seem worth
fixing - it's redundant with bitlbee.conf and not much more than a
source of confusion for users.

This also removes all the debconf stuff and all the translations which
are not used anymore (that looked a bit excessive for something that
just asks for a port number)

Location:
debian
Files:
17 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • debian/bitlbee-common.init

    r8768f67 r7a3d2c7  
    2323[ -x $DAEMON ] || exit 0
    2424
    25 # Default value
    26 BITLBEE_PORT=6667
    2725BITLBEE_OPTS=-F
    28 
    29 # Read config file if it is present.
    30 if [ -r /etc/default/$NAME ]; then
    31         . /etc/default/$NAME
    32 fi
    3326
    3427
     
    4235       
    4336        start-stop-daemon --start --quiet --pidfile $PIDFILE \
    44                 --exec $DAEMON -- -p $BITLBEE_PORT -P $PIDFILE $BITLBEE_OPTS
     37                --exec $DAEMON -- -P $PIDFILE $BITLBEE_OPTS
    4538}
    4639
     
    5649case "$1" in
    5750  start)
    58         [ "$BITLBEE_DISABLED" = "1" ] && exit 0
    59 
    6051        echo -n "Starting $DESC: $NAME"
    6152        d_start
  • debian/bitlbee-common.postinst

    r8768f67 r7a3d2c7  
    33set -e
    44
    5 . /usr/share/debconf/confmodule
    6 
    7 db_get bitlbee/serveport
    8 PORT="$RET"
    9 
    105CONFDIR=/var/lib/bitlbee/
    116
    12 ## Load default option. Don't want to put this in debconf (yet?)
    13 BITLBEE_OPTS=-F
    14 BITLBEE_DISABLED=0
    15 BITLBEE_UPGRADE_DONT_RESTART=0
    16 [ -r /etc/default/bitlbee ] && . /etc/default/bitlbee
    17 
    18 if [ "$BITLBEE_DISABLED" = "0" ] && which update-inetd > /dev/null 2> /dev/null &&
    19    ( expr "$2" : '0\..*' > /dev/null || expr "$2" : '1\.0\..*' > /dev/null ); then
    20         ## Make sure the inetd entry is gone (can still be there from a
    21         ## previous version.
    22         update-inetd --remove '.*/usr/sbin/bitlbee'
    23         if grep -q /usr/sbin/bitlbee /etc/inetd.conf 2> /dev/null; then
    24                 # Thanks for breaking update-inetd! (bugs.debian.org/311111)
    25                 # I hope that it works at least with xinetd, because this
    26                 # emergency hack doesn't:
    27                 perl -pi -e 's:^[^#].*/usr/sbin/bitlbee$:## Now using daemon mode\: # $&:' /etc/inetd.conf
    28                 killall -HUP inetd || true
    29         fi
    30 fi
    31 
    32 cat<<EOF>/etc/default/bitlbee
     7if [ -e /etc/default/bitlbee ]; then
     8   cat <<EOF >/etc/default/bitlbee
    339## /etc/default/bitlbee: Auto-generated/updated script.
    3410##
    35 ## If running in (fork)daemon mode, listen on this TCP port.
    36 BITLBEE_PORT="$PORT"
    37 
    38 ## Use single-process or forking daemon mode? Can't be changed from debconf,
    39 ## but maintainer scripts will save your changes here.
    40 BITLBEE_OPTS="$BITLBEE_OPTS"
    41 
    42 ## In case you want to stick with inetd mode (or if you just want to disable
    43 ## the init scripts for some other reason), you can disable the init script
    44 ## here. (Just set it to 1)
    45 BITLBEE_DISABLED=$BITLBEE_DISABLED
    46 
    47 ## As a server operator, you can use the RESTART command to restart only the
    48 ## master process while keeping all the child processes and their IPC
    49 ## connections. By enabling this, the maintainer scripts won't restart
    50 ## BitlBee during upgrades so you can restart the master process by hand.
    51 BITLBEE_UPGRADE_DONT_RESTART=$BITLBEE_UPGRADE_DONT_RESTART
     11## This file is deprecated and no longer used.
     12## Please edit /etc/bitlbee/bitlbee.conf instead
    5213EOF
    5314
    54 ## Bye-bye DebConf, we don't need you anymore.
    55 db_stop
     15fi
    5616
    5717## Restore the helpfile in case we weren't upgrading but just reconfiguring:
     
    6424fi
    6525
    66 if [ "$BITLBEE_UPGRADE_DONT_RESTART" != "1" -a  -n "$2" -a -x "/etc/init.d/bitlbee" ]; then
     26if [ -n "$2" -a -x "/etc/init.d/bitlbee" ]; then
    6727        invoke-rc.d bitlbee restart
    6828fi
Note: See TracChangeset for help on using the changeset viewer.