Update install script
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adrien Reslinger 2022-06-18 01:05:03 +02:00
parent c60cadc638
commit 609e729a5f
Signed by: adrien
GPG key ID: DA7B27055C66D6DE

View file

@ -7,9 +7,10 @@ for PARAM in "$@"; do
--static) STATIC=true ;;
--nouefi) UEFI=false ;;
--nocrypt) HDDCRYPT=false ;;
--noswap) NOSWAP=false ;;
--desktop) DESKTOP=desktop ;;
--help)
echo "syntaxe: $0 [--help] [--static] [--version=7|8] [--distrib=RedHat|CentOS|AlmaLinux] [--nouefi] [--nocrypt] [--desktop]"
echo "syntaxe: $0 [--help] [--static] [--version=7|8|9] [--distrib=RedHat|CentOS|AlmaLinux|RockyLinux] [--nouefi] [--nocrypt] [--desktop] [--noswap]"
exit 0
;;
esac
@ -38,18 +39,18 @@ MAC="$(ip addr show $IF | grep ether\ | awk '{print $2}' | cut -d/ -f2 | tr [A-
DNS="$(grep nameserver /etc/resolv.conf | grep -v 127.0.0.1 | awk '{printf $2","}' | sed 's/,$//')"
ARCH=$(uname -m | sed 's|i.86|i386|')
if [ "${DIST_VERSION}" == "8" ]; then
if [ "${DIST_VERSION}" == "8" -o "${DIST_VERSION}" == "9" ]; then
#MIRROIR=http://lune.saacy.reslinger.net/repos/CentOS8/$ARCH/os
if [ "$DISTRIB" == "CentOS" ]; then
MIRROIR=http://mirror.centos.org/centos/8/BaseOS/$ARCH/os
MIRROIR=http://mirror.centos.org/centos/${DIST_VERSION}/BaseOS/$ARCH/os
elif [ "$DISTRIB" == "RedHat" ]; then
MIRROIR=https://boot.reslinger.net/repo/8/rhel
MIRROIR=https://boot.reslinger.net/repo/${DIST_VERSION}/rhel
# elif [ "$DISTRIB" == "OracleLinux" ]; then
# MIRROIR=https://xxxx/8/BaseOS/$ARCH/os
# MIRROIR=https://xxxx/${DIST_VERSION}/BaseOS/$ARCH/os
elif [ "$DISTRIB" == "RockyLinux" ]; then
MIRROIR=https://download.rockylinux.org/pub/rocky/8/BaseOS/$ARCH/os/
MIRROIR=https://download.rockylinux.org/pub/rocky/${DIST_VERSION}/BaseOS/$ARCH/os/
elif [ "$DISTRIB" == "AlmaLinux" ]; then
MIRROIR=https://repo.almalinux.org/almalinux/8/BaseOS/$ARCH/os
MIRROIR=https://repo.almalinux.org/almalinux/${DIST_VERSION}/BaseOS/$ARCH/os
fi
elif [ "${DIST_VERSION}" == "7" ]; then
#MIRROIR=http://centos.mirrors.ovh.net/ftp.centos.org/7/os/$ARCH
@ -72,6 +73,11 @@ if [ ! -z "$HDDCRYPT" ]; then
INST_OPTIONS="${INST_OPTIONS} nocrypt"
fi
fi
if [ ! -z "$NOSWAP" ]; then
if [ "$NOSWAP" == "false" ]; then
INST_OPTIONS="${INST_OPTIONS} noswap"
fi
fi
if [ -z "$DNS" ]; then
if [ $(whois $IP | grep -ci dedibox) -gt 0 ]; then
# Dedibox