Added warning for unsupported versions of CentOS

fix-non-showing-inputs
Mike Hurley 2020-10-01 16:11:33 +00:00
parent 03835e3a97
commit aa9335ca01
1 changed files with 13 additions and 2 deletions

View File

@ -8,6 +8,18 @@ if [ "$version" = 7 ]; then
pkgmgr="yum"
elif [ "$version" = 8 ]; then
pkgmgr="dnf"
else
echo "This version of CentOS is unsupported!"
read -p "Continue at your own risk? Y/N" osoverride
#Changes input to uppercase
osoverride=${osoverride^}
if [ ! "$osoverride" = "Y" ]; then
exit 1
else
pkgmgr="yum"
fi
fi
#Check to see if we are running on a virtual machine
@ -36,7 +48,6 @@ echo "Installing dependencies and tools"
if [ "$version" = 7 ]; then
#Installing deltarpm first will greatly increase the download speed of the other packages
sudo yum install deltarpm -y -q -e 0
fi
#Install remaining packages
@ -271,4 +282,4 @@ if [ "$createSuperJson" = "Y" ]; then
echo "|| You can edit these settings in \"super.json\" ||"
echo "|| located in the Shinobi directory. ||"
echo "========================================================="
fi
fi