source: trunk/debathena/debathena/kiosk/debian/debathena-kiosk.postinst @ 24213

Revision 24213, 1.5 KB checked in by rbasch, 14 years ago (diff)
In debathena-kiosk: * Add a launcher GUI for the new gdm login window. (Trac: #431) * Disable the tabs bar for Firefox 3.5. * Move non-executables to /usr/share/debathena-kiosk.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2# postinst script for debathena-kiosk
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9#        * <postinst> `configure' <most-recently-configured-version>
10#        * <old-postinst> `abort-upgrade' <new version>
11#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12#          <new-version>
13#        * <postinst> `abort-remove'
14#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
15#          <failed-install-package> <version> `removing'
16#          <conflicting-package> <version>
17# for details, see http://www.debian.org/doc/debian-policy/ or
18# the debian-policy package
19
20
21case "$1" in
22    configure)
23        # Add the kiosk user.
24        user=kiosk@mit
25        if ! getent passwd $user >/dev/null; then
26            adduser --system --force-badname $user
27        fi
28        # In the new gdm, the launcher is invoked as user gdm.
29        gdm_version="$(dpkg-query -W -f '${Version}' gdm)"
30        if dpkg --compare-versions "$gdm_version" ge '2.25.2~'; then
31            cat >>/etc/sudoers <<EOF
32### BEGIN debathena-kiosk
33# gdm can launch kiosk mode
34gdm ALL=NOPASSWD: /usr/lib/debathena-kiosk/launch-kiosk
35### END debathena-kiosk
36EOF
37        fi
38    ;;
39
40    abort-upgrade|abort-remove|abort-deconfigure)
41    ;;
42
43    *)
44        echo "postinst called with unknown argument \`$1'" >&2
45        exit 1
46    ;;
47esac
48
49# dh_installdeb will replace this with shell code automatically
50# generated by other debhelper scripts.
51
52#DEBHELPER#
53
54exit 0
Note: See TracBrowser for help on using the repository browser.