summaryrefslogtreecommitdiff
path: root/debian/postinst
blob: 20aaccddfc0eaf8b4d4bb29f6a1b2f3474f1bd0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
set -e

if [ -f /usr/sbin/waagent.save ]; then
    dpkg-divert --package walinuxagent-data-saver --rename --remove /usr/sbin/waagent
fi

case "$1" in
    configure)
        waagent --setup --force
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
        if [ -f /etc/init.d/waagent ]; then
            rm /etc/init.d/waagent
        fi
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0