Merge "Remove old versions of grub2 from the yum cache"
This commit is contained in:
commit
77370c6740
@ -6,12 +6,14 @@ yum remove -y grub2
|
|||||||
# Install grub2 dependencies to minimise packages installed during finalise.
|
# Install grub2 dependencies to minimise packages installed during finalise.
|
||||||
install-packages grub2-tools gettext os-prober system-logos
|
install-packages grub2-tools gettext os-prober system-logos
|
||||||
|
|
||||||
# Ensure grub2 rpm is in the yum cache
|
# Remove all old versions of grub2 from the yum cache and then ensure the
|
||||||
|
# latest version is in the cache.
|
||||||
|
basearch=$(cat /etc/yum/vars/basearch)
|
||||||
|
find /tmp/yum/$basearch -regex ".*/grub2-[0-9].*\.rpm" -exec rm -f {} \;
|
||||||
install-packages -d grub2
|
install-packages -d grub2
|
||||||
|
|
||||||
# Copy grub2 rpm out of mounted yum cache for install during finalise
|
# Copy grub2 rpm out of mounted yum cache for install during finalise
|
||||||
mkdir /tmp/grub
|
mkdir /tmp/grub
|
||||||
basearch=$(cat /etc/yum/vars/basearch)
|
|
||||||
cp $(find /tmp/yum/$basearch -regex ".*/grub2-[0-9].*\.rpm") /tmp/grub
|
cp $(find /tmp/yum/$basearch -regex ".*/grub2-[0-9].*\.rpm") /tmp/grub
|
||||||
echo "rpm -i /tmp/grub/*.rpm" > /tmp/grub/install
|
echo "rpm -i /tmp/grub/*.rpm" > /tmp/grub/install
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user