Skip to content

Commit

Permalink
Merge pull request #27 from westfeld/fix_hostname_regexp
Browse files Browse the repository at this point in the history
correct hostname regexp fixes issue #24
  • Loading branch information
terem42 authored Jan 29, 2022
2 parents dc72f24 + 2592d74 commit c2bd033
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hetzner-debian10-zfs-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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! "
Expand Down
2 changes: 1 addition & 1 deletion hetzner-debian11-zfs-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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! "
Expand Down
2 changes: 1 addition & 1 deletion hetzner-ubuntu18-zfs-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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! "
Expand Down
2 changes: 1 addition & 1 deletion hetzner-ubuntu20-zfs-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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! "
Expand Down

0 comments on commit c2bd033

Please sign in to comment.