File: tpb.preinst

package info (click to toggle)
tpb 0.6.4-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 2,072 kB
  • ctags: 749
  • sloc: ansic: 6,789; sh: 3,442; yacc: 318; makefile: 303
file content (35 lines) | stat: -rw-r--r-- 641 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

PACKAGE="tpb"
CONFIG="/etc/default/$PACKAGE"
CONFIG_OLD="/etc/X11/Xsession.d/90tpb"

set -e
. /usr/share/debconf/confmodule || exit 0

# load data from old configuration file into debconf
if [ -f $CONFIG_OLD ]; then
  . $CONFIG_OLD

  if ! [ -z $START_TPB ]; then
    db_set $PACKAGE/autostart $START_TPB
  fi
fi

# override with data from new configuration
if [ -f $CONFIG ]; then
  . $CONFIG

  if ! [ -z $START_TPB ]; then
    db_set $PACKAGE/autostart $START_TPB
  fi
fi

# Remove any old devfs config in case it's still lingering
if [ -f /etc/devfs/conf.d/tpb ] ; then
    rm -f /etc/devfs/conf.d/tpb
fi

#DEBHELPER#

exit 0