MT#8883 Fix 43c9f159: CE Install CD missed pre-scripts/install-sipwise-key.sh

During the refactoring in 43c9f159 we missed the point that
/etc/debootstrap/pre-scripts/install-sipwise-key.sh should be
executed on CE install CD too even if we do NOT download key.

Otherwise we are getting:
> Reading package lists...
> W: GPG error: http://debian.sipwise.com wheezy Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB7765DA42C4F2A
> W: GPG error: http://debian.sipwise.com wheezy-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB7765DA42C4F2A
> W: GPG error: http://debian.sipwise.com wheezy-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB7765DA42C4F2A

and CE installation failed as unauthorized packages cannot be installed.

Change-Id: I3ccc8b8801ba2be829c4eea84507f11c841b7658
changes/51/1651/1
Alexander Lutay 10 years ago
parent 64dc77b74d
commit e5664d5850

@ -152,10 +152,21 @@ loadNfsIpArray() {
[ "$n" == "7" ] && return 0 || return 1
}
debootstrap_sipwise_key() {
mkdir -p /etc/debootstrap/pre-scripts/
cat > /etc/debootstrap/pre-scripts/install-sipwise-key.sh << EOF
#!/bin/bash
# installed via deployment.sh
cp /etc/apt/trusted.gpg.d/sipwise.gpg "\${MNTPOINT}"/etc/apt/trusted.gpg.d/
EOF
chmod 775 /etc/debootstrap/pre-scripts/install-sipwise-key.sh
}
install_sipwise_key() {
if [ -f "/etc/apt/trusted.gpg.d/sipwise.gpg" ]; then
md5sum_sipwise_key=$(md5sum /etc/apt/trusted.gpg.d/sipwise.gpg | awk '{print $1}')
echo "Sipwise keyring already installed (MD5: [${md5sum_sipwise_key}])"
echo "Sipwise keyring already installed (MD5: [${md5sum_sipwise_key}]), debootstrap sipwise key"
debootstrap_sipwise_key
return
else
echo "Sipwise keyring not found, downloading."
@ -183,13 +194,7 @@ install_sipwise_key() {
die "Error validating sipwise keyring for apt usage, aborting installation."
fi
mkdir -p /etc/debootstrap/pre-scripts/
cat > /etc/debootstrap/pre-scripts/install-sipwise-key.sh << EOF
#!/bin/bash
# installed via deployment.sh
cp /etc/apt/trusted.gpg.d/sipwise.gpg "\${MNTPOINT}"/etc/apt/trusted.gpg.d/
EOF
chmod 775 /etc/debootstrap/pre-scripts/install-sipwise-key.sh
debootstrap_sipwise_key
}
# see MT#6253

Loading…
Cancel
Save