2
# postinst script for mcollective
4
# see: dh_installdeb(1)
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>
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
20
# A simplified version of debconf's own config script.
21
. /usr/share/debconf/confmodule
25
db_get mcollective/stomp_host
26
if [ "${RET}z" != "z" ]
28
if [ ! -f /etc/mcollective/client.cfg ]
30
cat /usr/share/mcollective/client.cfg.dist | sed s/localhost/$RET/ > /etc/mcollective/client.cfg
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
37
db_get mcollective/psk_key
38
if [ "${RET}z" != "z" ]
40
if [ ! -f /etc/mcollective/client.cfg ]
42
cat /usr/share/mcollective/client.cfg.dist | sed s/plugin\.psk\ =\ unset/plugin\.psk\ =\ $RET/ > /etc/mcollective/client.cfg
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
49
if [ ! -f /etc/mcollective/client.cfg ]
51
cat /usr/share/mcollective/client.cfg.dist > /etc/mcollective/client.cfg
53
ucfr mcollective-client /etc/mcollective/client.cfg
56
abort-upgrade|abort-remove|abort-deconfigure|triggered)
60
echo "postinst called with unknown argument \`$1'" >&2
65
# dh_installdeb will replace this with shell code automatically
66
# generated by other debhelper scripts.