source: gutenbach/debian/gutenbach.postinst @ e4cb270

debianmacno-cupsnodebathenaweb
Last change on this file since e4cb270 was e4cb270, checked in by Jessica B. Hamrick <jhamrick@…>, 15 years ago

Package installs cleanly on lbsg. Still need to test it on zsr.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1#!/bin/sh
2# postinst script for gutenbach
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. /usr/share/debconf/confmodule
21
22case "$1" in
23    configure|reconfigure)
24        if [ ! -d /usr/lib/gutenbach/config ]; then
25            mkdir /usr/lib/gutenbach/config
26        fi
27
28        db_get gutenbach/zephyrclass
29        echo "$RET" > /usr/lib/gutenbach/config/zephyrclass
30        db_get gutenbach/printername
31        echo "$RET" > /usr/lib/gutenbach/config/printername
32        db_get gutenbach/hostname
33        echo "$RET" > /usr/lib/gutenbach/config/hostname
34
35        chmod +x /usr/lib/gutenbach/inst/create-filter-config
36        chmod +x /usr/lib/gutenbach/inst/edit-printcap
37        chmod +x /usr/lib/gutenbach/inst/edit-lpd.conf
38        chmod +x /usr/lib/gutenbach/inst/run-checkpc
39        chmod +x /usr/lib/gutenbach/inst/edit-lpd.perms
40        /usr/lib/gutenbach/inst/create-filter-config
41        /usr/lib/gutenbach/inst/edit-printcap
42        /usr/lib/gutenbach/inst/edit-lpd.conf
43        /usr/lib/gutenbach/inst/run-checkpc
44        /usr/lib/gutenbach/inst/edit-lpd.perms
45
46        inaudio=$(groups daemon | grep audio || true)
47        if [ -z "$inaudio" ]; then
48            adduser daemon audio
49        fi
50
51        db_stop
52    ;;
53
54    abort-upgrade|abort-remove|abort-deconfigure)
55    ;;
56
57    *)
58        echo "postinst called with unknown argument \`$1'" >&2
59        exit 1
60    ;;
61esac
62
63# dh_installdeb will replace this with shell code automatically
64# generated by other debhelper scripts.
65
66#DEBHELPER#
67
68exit 0
Note: See TracBrowser for help on using the repository browser.