#!/bin/sh # make sure apt knows about the new keys if [ -x /usr/bin/apt-key ]; then /usr/bin/apt-key update fi # the keyring in /var that gets fetched by apt-key net-update # if it does not yet exist, copy it to avoid uneeded net copy KEYRINGDIR="/var/lib/apt/keyrings" KEYRING="${KEYRINGDIR}/ubuntu-archive-keyring.gpg" if ! test -d $KEYRINGDIR; then mkdir -m 755 -p $KEYRINGDIR fi if ! test -f $KEYRING; then cp /usr/share/keyrings/ubuntu-archive-keyring.gpg $KEYRING touch $KEYRING fi LX0711_FILE="/usr/share/keyrings/llx0711.gpg" LLX0809_FILE="/usr/share/keyrings/llx0809.gpg" LLX0909_FILE="/usr/share/keyrings/llx0909.gpg" LLX1009_FILE="/usr/share/keyrings/llx1009.gpg" LLX1206_FILE="/usr/share/keyrings/llx1206.gpg" LLX1306_FILE="/usr/share/keyrings/llx1306.gpg" LLXMIRROR_FILE="/usr/share/keyrings/llxmirror.gpg" FILES_TO_ADD="$LLX1009_FILE $LLX1206_FILE $LLXMIRROR_FILE $LLX1306_FILE" LLX1009_KEY="C6EBF5B8" LLX0909_KEY="715BC25E" LLX0809_KEY="0639F293" LLX0711_KEY="E5F463E5" KEYS_TO_DELETE="${LLX0711_KEY} ${LLX0809_KEY} ${LLX0909_KEY}" GPG_CMD="gpg --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --quiet --batch --with-colons --list-keys --keyring /etc/apt/trusted.gpg" if [ -x /usr/bin/apt-key ]; then apt-key update for f in ${FILES_TO_ADD} ; do apt-key add ${f} || true cp -f "$f" "$KEYRINGDIR" done; INSTALLED_KEYS=$($GPG_CMD | sed -n "/^pub/p" | cut -d ":" -f 5 ) for f in ${KEYS_TO_DELETE} ; do if [ -n "$(echo $INSTALLED_KEYS | grep $f)" ] ; then apt-key del ${f} || true fi; done; fi