use default/grub and an if check

This commit is contained in:
Louis Abel 2024-05-01 16:05:15 -07:00
parent f1ec5b7f57
commit ad58d6e53f
Signed by untrusted user: label
GPG key ID: 2A6975660E424560

View file

@ -212,7 +212,10 @@ timeout 300;
retry 60;
EOF
sed -i -e 's/ rhgb quiet//' /boot/grub2/grub.conf
if [ -f /boot/grub2/grub.conf ]; then
sed -i -e 's/ rhgb quiet//' /boot/grub2/grub.conf
fi
sed -i -e 's/ rhgb quiet//' /etc/default/grub
cat > /etc/modprobe.d/blacklist-nouveau.conf << EOL
blacklist nouveau
EOL
@ -425,7 +428,10 @@ EOF
rpm --import /tmp/key
# remove these for debugging
sed -i -e 's/ rhgb quiet//' /boot/grub2/grub.conf
if [ -f /boot/grub2/grub.conf ]; then
sed -i -e 's/ rhgb quiet//' /boot/grub2/grub.conf
fi
sed -i -e 's/ rhgb quiet//' /etc/default/grub
# enable resizing on copied AMIs
echo 'install_items+=" sgdisk "' > /etc/dracut.conf.d/sgdisk.conf