cloud image import fedora GPG key for RPMs, as the livecd does

(cherry picked from commit c6f36e4c10)
This commit is contained in:
Matthew Miller 2013-12-06 12:16:02 -05:00
parent 9625f87b66
commit d761360668

View File

@ -195,6 +195,19 @@ yum history new
yum clean all
truncate -c -s 0 /var/log/yum.log
echo "Import RPM GPG key"
releasever=$(rpm -q --qf '%{version}\n' fedora-release)
basearch=$(uname -m)
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
echo "Packages within this cloud image:"
echo "-----------------------------------------------------------------------"
rpm -qa
echo "-----------------------------------------------------------------------"
# Note that running rpm recreates the rpm db files which aren't needed/wanted
rm -f /var/lib/rpm/__db*
echo "Fixing SELinux contexts."
touch /var/log/cron
touch /var/log/boot.log