Not update centos 7

This commit is contained in:
Manuel Romero
2025-06-30 11:05:13 +02:00
parent 624b174278
commit dddc1fd9bd

View File

@@ -1,6 +1,15 @@
#!/bin/bash
echo "--- Executing: $0 $@"
echo 'Updating OS. This will take a around 10 minutes'
dnf -y --quiet update
cVer=`rpm -E %{rhel}`
if [ -z "$cVer" ]; then
echo "Error: Unable to determine CentOS version."
exit 0
fi
if [ "$cVer" -gt 7 ]; then
echo "--- Executing: $0 $@"
echo 'Updating OS. This will take a around 10 minutes'
dnf -y --quiet update
fi