This file is indexed.

postinst is in ubuntu-cloud-keyring 2012.08.14.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh

set -e

TRUSTEDFILE="/etc/apt/trusted.gpg"
ARCHIVE_KEYRING="/usr/share/keyrings/ubuntu-cloud-keyring.gpg"
REMOVED_KEYS="/usr/share/keyrings/ubuntu-cloud-keyring-removed-keys.gpg"

GPG_CMD="gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg"
GPG="$GPG_CMD  --keyring $TRUSTEDFILE --primary-keyring $TRUSTEDFILE"

process_remove_keyring() {
    REMOVED_KEYS="$1"

    if [ -r "$REMOVED_KEYS" ]; then
	# remove no-longer supported/used keys
	keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5`
	for key in $keys; do
	    if $GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key; then
		$GPG  --batch --delete-key --yes ${key}
	    fi
	done
    fi
}

case "$1" in
    configure)
	if [ -x /usr/bin/apt-key ]; then
            echo "Importing ubuntu-cloud.archive.canonical.com keyring"
	    apt-key add "$ARCHIVE_KEYRING"
        fi
        if [ -x /usr/bin/gpg ]; then
            echo "Processing ubuntu-cloud.archive.canonical.com removal keyring"
            process_remove_keyring  "$REMOVED_KEYS"
            echo "OK"
	fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

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



exit 0