Misc fixes. Updated IPV4 regex.
This commit is contained in:
+7
-7
@@ -97,7 +97,7 @@ launch_gui() {
|
||||
}
|
||||
|
||||
hierarchy_preparation() {
|
||||
echod "\n 🔄 Preparing the folder hierarchy for the final configuration..."
|
||||
echod "\n 🔄 Preparing the folder hierarchy for the final configuration...\n"
|
||||
|
||||
# Extra files folders
|
||||
mkdir -${MKDIR_FLAGS} ${TMP_EXTRA_PATH}/home/numbus-admin/.ssh/
|
||||
@@ -112,13 +112,13 @@ hierarchy_preparation() {
|
||||
setup_ssh() {
|
||||
edit_var() {
|
||||
echo -e "${1}"
|
||||
echo -e " Please check the credentials provided in the configuration."
|
||||
echo -e " Please check the credentials provided in the configuration."
|
||||
echo -e "\n ➡️ Here are the current settings :
|
||||
Target IP address : $(gum style --italic "\"${LIVE_TARGET_IP}\"")
|
||||
Target password : $(gum style --italic "\"${LIVE_TARGET_PASSWORD}\"")"
|
||||
Target IP address : $(gum style --italic "\"${LIVE_TARGET_IP}\"")
|
||||
Target password : $(gum style --italic "\"${LIVE_TARGET_PASSWORD}\"")"
|
||||
gum confirm "Are these correct ?" || {
|
||||
get_valid_input "LIVE_TARGET_IP" "\n ➡️ Provide the IP address of your machine in a NixOS live environment :" "192.168.1.100" "IP_REGEX";
|
||||
get_valid_input "LIVE_TARGET_IP" "\n ➡️ Provide the password of your machine in a NixOS live environment :" "password" "" "true" "true";
|
||||
get_valid_input "LIVE_TARGET_IP" "➡️ Provide the IP address of your machine in a NixOS live environment :" "192.168.1.100" "IP_REGEX";
|
||||
get_valid_input "LIVE_TARGET_IP" "➡️ Provide the password of your machine in a NixOS live environment :" "password" "" "true" "true";
|
||||
continue;
|
||||
}
|
||||
gum confirm "Retry connection ?" || {
|
||||
@@ -802,7 +802,7 @@ else
|
||||
STDERR="/dev/null"
|
||||
fi
|
||||
|
||||
IP_REGEX='^([0-9]{1,3}\.){3}[0-9]{1,3}$'
|
||||
IP_REGEX='^(((?!25?[6-9])[12]\d|[1-9])?\d\.?\b){4}$'
|
||||
SUBNET_REGEX='^([0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]{1,2}$'
|
||||
DOMAIN_REGEX='^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$'
|
||||
EMAIL_REGEX='^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
|
||||
|
||||
Reference in New Issue
Block a user