From 2592d744bbf0709510b1aa542b6af9ecb3077af1 Mon Sep 17 00:00:00 2001 From: Thomas Westfeld Date: Mon, 24 Jan 2022 19:19:59 +0100 Subject: [PATCH] correct hostname regexp fixes issue #24 --- hetzner-debian10-zfs-setup.sh | 2 +- hetzner-debian11-zfs-setup.sh | 2 +- hetzner-ubuntu18-zfs-setup.sh | 2 +- hetzner-ubuntu20-zfs-setup.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hetzner-debian10-zfs-setup.sh b/hetzner-debian10-zfs-setup.sh index 8abeb80..8cd57c7 100644 --- a/hetzner-debian10-zfs-setup.sh +++ b/hetzner-debian10-zfs-setup.sh @@ -381,7 +381,7 @@ function ask_hostname { local hostname_invalid_message= - while [[ ! $v_hostname =~ ^[a-z][a-zA-Z_:.-]+$ ]]; do + while [[ ! $v_hostname =~ ^[a-z][a-zA-Z0-9_:.-]+$ ]]; do v_hostname=$(dialog --inputbox "${hostname_invalid_message}Set the host name" 30 100 "$c_default_hostname" 3>&1 1>&2 2>&3) hostname_invalid_message="Invalid host name! " diff --git a/hetzner-debian11-zfs-setup.sh b/hetzner-debian11-zfs-setup.sh index ce4bcea..b6267e0 100644 --- a/hetzner-debian11-zfs-setup.sh +++ b/hetzner-debian11-zfs-setup.sh @@ -382,7 +382,7 @@ function ask_hostname { local hostname_invalid_message= - while [[ ! $v_hostname =~ ^[a-z][a-zA-Z_:.-]+$ ]]; do + while [[ ! $v_hostname =~ ^[a-z][a-zA-Z0-9_:.-]+$ ]]; do v_hostname=$(dialog --inputbox "${hostname_invalid_message}Set the host name" 30 100 "$c_default_hostname" 3>&1 1>&2 2>&3) hostname_invalid_message="Invalid host name! " diff --git a/hetzner-ubuntu18-zfs-setup.sh b/hetzner-ubuntu18-zfs-setup.sh index 69d70fa..5ddcf98 100644 --- a/hetzner-ubuntu18-zfs-setup.sh +++ b/hetzner-ubuntu18-zfs-setup.sh @@ -346,7 +346,7 @@ function ask_hostname { local hostname_invalid_message= - while [[ ! $v_hostname =~ ^[a-z][a-zA-Z_:.-]+$ ]]; do + while [[ ! $v_hostname =~ ^[a-z][a-zA-Z0-9_:.-]+$ ]]; do v_hostname=$(dialog --inputbox "${hostname_invalid_message}Set the host name" 30 100 "$c_default_hostname" 3>&1 1>&2 2>&3) hostname_invalid_message="Invalid host name! " diff --git a/hetzner-ubuntu20-zfs-setup.sh b/hetzner-ubuntu20-zfs-setup.sh index 89b592f..628937f 100644 --- a/hetzner-ubuntu20-zfs-setup.sh +++ b/hetzner-ubuntu20-zfs-setup.sh @@ -346,7 +346,7 @@ function ask_hostname { local hostname_invalid_message= - while [[ ! $v_hostname =~ ^[a-z][a-zA-Z_:.-]+$ ]]; do + while [[ ! $v_hostname =~ ^[a-z][a-zA-Z0-9_:.-]+$ ]]; do v_hostname=$(dialog --inputbox "${hostname_invalid_message}Set the host name" 30 100 "$c_default_hostname" 3>&1 1>&2 2>&3) hostname_invalid_message="Invalid host name! "