Add option to configure hostname for kickstart
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adrien Reslinger 2022-12-05 08:33:37 +01:00
parent 806565d2b3
commit 5d8cb6dad2
Signed by: adrien
GPG key ID: DA7B27055C66D6DE

View file

@ -9,8 +9,9 @@ for PARAM in "$@"; do
--nocrypt) HDDCRYPT=false ;; --nocrypt) HDDCRYPT=false ;;
--noswap) NOSWAP=false ;; --noswap) NOSWAP=false ;;
--desktop) DESKTOP=desktop ;; --desktop) DESKTOP=desktop ;;
--hostname=*) HOST_NAME="${PARAM/*=}" ;;
--help|-h) --help|-h)
echo "syntaxe: $0 [--help] [--static] [--version=7|8|9] [--distrib=RedHat|CentOS|AlmaLinux|RockyLinux] [--nouefi] [--nocrypt] [--desktop] [--noswap]" echo "syntaxe: $0 [--help] [--static] [--version=7|8|9] [--distrib=RedHat|CentOS|AlmaLinux|RockyLinux] [--hostname=myname] [--nouefi] [--nocrypt] [--desktop] [--noswap]"
exit 0 exit 0
;; ;;
esac esac
@ -78,6 +79,9 @@ if [ ! -z "$NOSWAP" ]; then
INST_OPTIONS="${INST_OPTIONS} noswap" INST_OPTIONS="${INST_OPTIONS} noswap"
fi fi
fi fi
if [ ! -z "$HOST_NAME" ]; then
INST_OPTIONS="${INST_OPTIONS} hostname=${HOST_NAME}"
fi
if [ -z "$DNS" ]; then if [ -z "$DNS" ]; then
if [ $(whois $IP | grep -ci dedibox) -gt 0 ]; then if [ $(whois $IP | grep -ci dedibox) -gt 0 ]; then
# Dedibox # Dedibox