diff --git a/files/usr/local/sbin/install_pxe.sh b/files/usr/local/sbin/install_pxe.sh index 6fc6c12..f6ce71f 100755 --- a/files/usr/local/sbin/install_pxe.sh +++ b/files/usr/local/sbin/install_pxe.sh @@ -9,8 +9,9 @@ for PARAM in "$@"; do --nocrypt) HDDCRYPT=false ;; --noswap) NOSWAP=false ;; --desktop) DESKTOP=desktop ;; + --hostname=*) HOST_NAME="${PARAM/*=}" ;; --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 ;; esac @@ -78,6 +79,9 @@ if [ ! -z "$NOSWAP" ]; then INST_OPTIONS="${INST_OPTIONS} noswap" fi fi +if [ ! -z "$HOST_NAME" ]; then + INST_OPTIONS="${INST_OPTIONS} hostname=${HOST_NAME}" +fi if [ -z "$DNS" ]; then if [ $(whois $IP | grep -ci dedibox) -gt 0 ]; then # Dedibox