source: lliurex-keyring/trunk/fuentes/debian/postinst @ 1779

Last change on this file since 1779 was 1779, checked in by kbut, 5 years ago

modify install key

File size: 1.6 KB
Line 
1#!/bin/sh
2# postinst script for lliurex-keyring
3#
4# see: dh_installdeb(1)
5
6set -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 https://www.debian.org/doc/debian-policy/ or
18# the debian-policy package
19
20KEYRINGDIR="/var/lib/apt/keyrings"
21KEYRINGNAME="lliurex-archive-keyring.gpg"
22KEYRING="${KEYRINGDIR}/${KEYRINGNAME}"
23
24if ! test -d $KEYRINGDIR; then
25     mkdir -m 755 -p $KEYRINGDIR
26fi
27
28
29# sensible default permissions if there is no keyring yet
30# (gpg will use 0600 otherwise and that will break release-upgrades later)
31ETC_KEYRING="/etc/apt/trusted.gpg"
32if [ ! -f $ETC_KEYRING ]; then
33    touch $ETC_KEYRING
34    chmod 0644 $ETC_KEYRING
35fi
36
37gpg --import /usr/share/keyrings/$KEYRINGNAME || true 
38gpg --armor --export 38970B2B | apt-key add - || true
39
40# make sure apt knows about the new keys
41if [ -x /usr/bin/apt-key ]; then
42    /usr/bin/apt-key update
43fi
44
45case "$1" in
46    configure)
47    ;;
48
49    abort-upgrade|abort-remove|abort-deconfigure)
50    ;;
51
52    *)
53        echo "postinst called with unknown argument \`$1'" >&2
54        exit 1
55    ;;
56esac
57
58# dh_installdeb will replace this with shell code automatically
59# generated by other debhelper scripts.
60
61#DEBHELPER#
62
63exit 0
Note: See TracBrowser for help on using the repository browser.