#!/bin/sh # postinst script for lliurex-keyring # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see https://www.debian.org/doc/debian-policy/ or # the debian-policy package KEYRINGDIR="/var/lib/apt/keyrings" KEYRINGNAME="lliurex-archive-keyring.gpg" KEYRING="${KEYRINGDIR}/${KEYRINGNAME}" if ! test -d $KEYRINGDIR; then mkdir -m 755 -p $KEYRINGDIR fi # sensible default permissions if there is no keyring yet # (gpg will use 0600 otherwise and that will break release-upgrades later) ETC_KEYRING="/etc/apt/trusted.gpg" if [ ! -f $ETC_KEYRING ]; then touch $ETC_KEYRING chmod 0644 $ETC_KEYRING fi gpg --import /usr/share/keyrings/$KEYRINGNAME || true gpg --armor --export 38970B2B | apt-key add - || true # make sure apt knows about the new keys if [ -x /usr/bin/apt-key ]; then /usr/bin/apt-key add /usr/share/keyrings/$KEYRINGNAME /usr/bin/apt-key update fi case "$1" in configure) ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0