Rev 2 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 4 | ||
---|---|---|---|
1 | #! /bin/sh |
1 | #! /bin/sh |
2 | # postinst script for pmk |
2 | # postinst script for pmk |
3 | # |
3 | # |
4 | # see: dh_installdeb(1) |
4 | # see: dh_installdeb(1) |
5 | 5 | ||
6 | conffile=/etc/pmk/pmk.conf |
6 | conffile=/etc/pmk/pmk.conf |
7 | 7 | ||
8 | set -e |
8 | set -e |
9 | 9 | ||
10 | if [ -e /usr/share/debconf/confmodule ]; then |
10 | if [ -e /usr/share/debconf/confmodule ]; then |
11 | . /usr/share/debconf/confmodule |
11 | . /usr/share/debconf/confmodule |
12 | fi |
12 | fi |
13 | 13 | ||
14 | case "$1" in |
14 | case "$1" in |
15 | configure|reconfigure) |
15 | configure|reconfigure) |
16 | # Note that -s and -g are added by 25_pmksetup.dpatch; |
16 | # Note that -s and -g are added by 25_pmksetup.dpatch; |
17 | # they are not documented in pmksetup(8). |
17 | # they are not documented in pmksetup(8). |
18 | tempfile=`mktemp -t pmksetup.XXXXXXXXXX` |
18 | tempfile=`mktemp -t pmksetup.XXXXXXXXXX` |
19 | if pmksetup -s -g \ |
19 | if pmksetup -s -g \ |
20 | -u PREFIX=\"/usr\" \ |
20 | -u PREFIX=\"/usr\" \ |
21 | -u BIN_CC=\"/usr/bin/gcc\" \ |
21 | -u BIN_CC=\"/usr/bin/gcc\" \ |
22 | -u BIN_CXX=\"/usr/bin/g++\" \ |
22 | -u BIN_CXX=\"/usr/bin/g++\" \ |
23 | -u PATH_BIN=\"/usr/local/bin:/usr/bin:/bin\" \ |
23 | -u PATH_BIN=\"/usr/local/bin:/usr/bin:/bin\" \ |
24 | -u OS_ARCH=\"`dpkg --print-architecture`\" \ |
24 | -u OS_ARCH=\"`dpkg --print-architecture`\" \ |
25 | 2> /dev/null > $tempfile; |
25 | 2> /dev/null > $tempfile; |
26 | then |
26 | then |
27 | ucf --three-way --debconf-ok $tempfile $conffile |
27 | ucf --three-way --debconf-ok $tempfile $conffile |
28 | rm -f $tempfile |
28 | rm -f $tempfile |
29 | ucfr pmk $conffile |
29 | ucfr pmk $conffile |
30 | else |
30 | else |
31 | rm -f $tempfile |
31 | rm -f $tempfile |
32 | exit 1 |
32 | exit 1 |
33 | fi |
33 | fi |
34 | 34 | ||
35 | # Clean out any remains of this package from the Debconf database |
35 | # Clean out any remains of this package from the Debconf database |
36 | if [ -e /usr/share/debconf/confmodule ]; then |
36 | if [ -e /usr/share/debconf/confmodule ]; then |
37 | db_purge |
37 | db_purge |
38 | fi |
38 | fi |
39 | ;; |
39 | ;; |
40 | 40 | ||
41 | abort-upgrade|abort-remove|abort-deconfigure) |
41 | abort-upgrade|abort-remove|abort-deconfigure) |
42 | ;; |
42 | ;; |
43 | 43 | ||
44 | *) |
44 | *) |
45 | echo "postinst called with unknown argument \`$1'" >&2 |
45 | echo "postinst called with unknown argument \`$1'" >&2 |
46 | exit 1 |
46 | exit 1 |
47 | ;; |
47 | ;; |
48 | esac |
48 | esac |
49 | 49 | ||
50 | # dh_installdeb will replace this with shell code automatically |
50 | # dh_installdeb will replace this with shell code automatically |
51 | # generated by other debhelper scripts. |
51 | # generated by other debhelper scripts. |
52 | 52 | ||
53 | #DEBHELPER# |
53 | #DEBHELPER# |
54 | 54 | ||
55 | exit 0 |
55 | exit 0 |