~ubuntu-branches/ubuntu/oneiric/mcollective/oneiric-proposed

« back to all changes in this revision

Viewing changes to debian/mcollective-client.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Marc Cluet, Marc Cluet, Chuck Short
  • Date: 2011-05-05 07:37:54 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110505073754-klk1jkz8afi4fomx
Tags: 1.2.0-0ubuntu1
[Marc Cluet]
* Update to 1.2.0
* Build for Oneiric.

[Chuck Short]
* Drop ruby from mcollective, mcollective-middleware, mcollective-client
  since its a dependency of mcollective-common.
* Bump standards to 3.9.2.
* Fix up lintian warnings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# postinst script for mcollective
 
3
#
 
4
# see: dh_installdeb(1)
 
5
 
 
6
set -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
# A simplified version of debconf's own config script.
 
21
. /usr/share/debconf/confmodule
 
22
 
 
23
case "$1" in
 
24
    configure)
 
25
        db_get mcollective/stomp_host
 
26
        if [ "${RET}z" != "z" ]
 
27
        then
 
28
            if [ ! -f /etc/mcollective/client.cfg ]
 
29
            then
 
30
                cat /usr/share/mcollective/client.cfg.dist | sed s/localhost/$RET/ > /etc/mcollective/client.cfg
 
31
            else
 
32
                mv /etc/mcollective/client.cfg /etc/mcollective/.client.cfg
 
33
                cat /etc/mcollective/.client.cfg | sed s/localhost/$RET/ > /etc/mcollective/client.cfg
 
34
                rm -f /etc/mcollective/.client.cfg
 
35
            fi
 
36
        fi  
 
37
        db_get mcollective/psk_key
 
38
        if [ "${RET}z" != "z" ]
 
39
        then
 
40
            if [ ! -f /etc/mcollective/client.cfg ]
 
41
            then
 
42
                cat /usr/share/mcollective/client.cfg.dist | sed s/plugin\.psk\ =\ unset/plugin\.psk\ =\ $RET/ > /etc/mcollective/client.cfg
 
43
            else
 
44
                mv /etc/mcollective/client.cfg /etc/mcollective/.client.cfg
 
45
                cat /etc/mcollective/.client.cfg | sed s/plugin\.psk\ =\ unset/plugin\.psk\ =\ $RET/ > /etc/mcollective/client.cfg
 
46
                rm -f /etc/mcollective/.client.cfg
 
47
            fi
 
48
        fi
 
49
        if [ ! -f /etc/mcollective/client.cfg ]
 
50
        then
 
51
            cat /usr/share/mcollective/client.cfg.dist > /etc/mcollective/client.cfg
 
52
        fi
 
53
        ucfr mcollective-client /etc/mcollective/client.cfg
 
54
    ;;
 
55
 
 
56
    abort-upgrade|abort-remove|abort-deconfigure|triggered)
 
57
    ;;
 
58
 
 
59
    *)
 
60
        echo "postinst called with unknown argument \`$1'" >&2
 
61
        exit 1
 
62
    ;;
 
63
esac
 
64
 
 
65
# dh_installdeb will replace this with shell code automatically
 
66
# generated by other debhelper scripts.
 
67
 
 
68
#DEBHELPER#
 
69
 
 
70
exit 0