diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index bc684e90..a479a365 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -66,7 +66,7 @@ function spinner() { # This function displays an informational message with a yellow color. function msg_info() { local msg="$1" - echo -ne " ${TAB}${YW}${msg}" + echo -ne "${TAB}${YW}${msg}" spinner & SPINNER_PID=$! } @@ -123,7 +123,7 @@ function select_storage() { local TAG=$(echo $line | awk '{print $1}') local TYPE=$(echo $line | awk '{printf "%-10s", $2}') local FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') - local ITEM=" Type: $TYPE Free: $FREE " + local ITEM="Type: $TYPE Free: $FREE " local OFFSET=2 if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then local MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 56743adf..e8244baa 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -49,7 +49,7 @@ verb_ip6() { fi } -# This function sets error handling options and defines the error_handler function to handle errors +# This function catches errors and handles them with the error handler function catch_errors() { set -Eeuo pipefail trap 'error_handler $LINENO "$BASH_COMMAND"' ERR @@ -168,7 +168,7 @@ motd_ssh() { fi } -# This function customizes the container and enabling the passwordless login for the root user +# This function customizes the container and enables passwordless login for the root user customize() { if [[ "$PASSWORD" == "" ]]; then msg_info "Customizing Container" diff --git a/misc/install.func b/misc/install.func index 01c31c81..e157d1cb 100644 --- a/misc/install.func +++ b/misc/install.func @@ -86,8 +86,8 @@ spinner() { # This function displays an informational message with a yellow color. msg_info() { local msg="$1" - echo -ne " ${TAB}${YW}${msg}" - spinner & + echo -ne "${TAB}${YW}${msg}" + spinner & SPINNER_PID=$! } @@ -142,7 +142,7 @@ network_check() { ipv4_connected=false ipv6_connected=false sleep 1 -# Check IPv4 connectivity +# Check IPv4 connectivity to Google, Cloudflare & Quad9 DNS servers. if ping -c 1 -W 1 1.1.1.1 &>/dev/null || ping -c 1 -W 1 8.8.8.8 &>/dev/null || ping -c 1 -W 1 9.9.9.9 &>/dev/null; then msg_ok "IPv4 Internet Connected"; ipv4_connected=true @@ -150,7 +150,7 @@ network_check() { msg_error "IPv4 Internet Not Connected"; fi -# Check IPv6 connectivity +# Check IPv6 connectivity to Google, Cloudflare & Quad9 DNS servers. if ping6 -c 1 -W 1 2606:4700:4700::1111 &>/dev/null || ping6 -c 1 -W 1 2001:4860:4860::8888 &>/dev/null || ping6 -c 1 -W 1 2620:fe::fe &>/dev/null; then msg_ok "IPv6 Internet Connected"; ipv6_connected=true