Update install_pxe.sh script
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
18fb54315d
commit
7c88af5102
1 changed files with 67 additions and 60 deletions
|
|
@ -6,20 +6,23 @@ for PARAM in "$@"; do
|
|||
--distrib=*) DISTRIB="${PARAM/*=}" ;;
|
||||
--static) STATIC=true ;;
|
||||
--help)
|
||||
echo "syntaxe: $0 [--help] [--static] [--version=7|8] [--distrib=CentOS|AlmaLinux]"
|
||||
echo "syntaxe: $0 [--help] [--static] [--version=7|8] [--distrib=RedHat|CentOS|AlmaLinux]"
|
||||
esac
|
||||
done
|
||||
if [ -z "${DIST_VERSION}" ]; then
|
||||
DIST_VERSION=8
|
||||
fi
|
||||
if [ -z "${DISTRIB}" ]; then
|
||||
DISTRIB="CentOS"
|
||||
DISTRIB="AlmaLinux"
|
||||
fi
|
||||
|
||||
|
||||
if ! which wget; then
|
||||
yum install -y wget
|
||||
fi
|
||||
if ! which ipcalc; then
|
||||
yum install -y ipcalc
|
||||
fi
|
||||
|
||||
IF="$(ip route show | grep ^default | sed 's/.* dev \([^ ]*\) *.*/\1/' | sort -u)"
|
||||
IP="$(ip addr show $IF | grep inet\ | awk '{print $2}' | cut -d/ -f1)"
|
||||
|
|
@ -34,6 +37,10 @@ if [ "${DIST_VERSION}" == "8" ]; 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
|
||||
elif [ "$DISTRIB" == "RedHat" ]; then
|
||||
MIRROIR=https://boot.reslinger.net/repo/8/rhel
|
||||
# elif [ "$DISTRIB" == "OracleLinux" ]; then
|
||||
# MIRROIR=https://xxxx/8/BaseOS/x86_64/os
|
||||
elif [ "$DISTRIB" == "AlmaLinux" ]; then
|
||||
MIRROIR=https://repo.almalinux.org/almalinux/8/BaseOS/x86_64/os
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue