This file is indexed.

postinst is in tpb 0.6.4-8.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#! /bin/sh

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

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

case "$1" in
  configure)

  getent group nvram >/dev/null || addgroup --system nvram

  if [ -e /dev/nvram ]; then
      chown root:nvram /dev/nvram
      chmod u+rw,g+r /dev/nvram
  fi

  # set option for autostart in /etc/X11/Xsession.d/90tpb
  if ! [ -f $CONFIG ]; then
    cat <<EOF > $CONFIG
# set this option to 'true' if you want to start tpb automatically after X has
# been started for a user. Otherwise set it to 'false'.
START_TPB=
EOF
  fi

  db_get $PACKAGE/autostart
  START_TPB=$RET

  # backup for $CONFIG with preserved ownership and permissions
  cp -a -f $CONFIG $CONFIG.tmp

  # re-insert values deleted in $CONFIG but existant in debconf
  test -z "$START_TPB" || grep -Eq '^ *START_TPB=' $CONFIG || echo "START_TPB=" >> $CONFIG

  # replace values of configuration variables in config file, preserving
  # all comments and other variables defined by the admin
  sed -e "
  s#^ *START_TPB=.*#START_TPB=\"$START_TPB\"#
  " < $CONFIG > $CONFIG.tmp
  mv -f $CONFIG.tmp $CONFIG
  ;;

  abort-upgrade|abort-remove|abort-deconfigure)

  ;;

  *)
  echo "postinst called with unknown argument \`$1'" >&2
  exit 1
  ;;
esac
db_stop

# Automatically added by dh_installudev
if [ "$1" = configure ]; then
	if [ -e "/etc/udev/rules.d/92_tpb.rules" ]; then
		echo "Preserving user changes to /etc/udev/rules.d/92-tpb.rules ..."
		if [ -e "/etc/udev/rules.d/92-tpb.rules" ]; then
			mv -f "/etc/udev/rules.d/92-tpb.rules" "/etc/udev/rules.d/92-tpb.rules.dpkg-new"
		fi
		mv -f "/etc/udev/rules.d/92_tpb.rules" "/etc/udev/rules.d/92-tpb.rules"
	fi
fi
# End automatically added section


exit 0