From 4cd307543aa126672929871fc01693dff4fcdf03 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 20 May 2025 10:02:14 +0200 Subject: [PATCH] Config File --- misc/config-file.func | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/misc/config-file.func b/misc/config-file.func index 18abf1e7..81b9002c 100644 --- a/misc/config-file.func +++ b/misc/config-file.func @@ -324,11 +324,9 @@ config_file() { for ((ip_int=start_int; ip_int<=end_int; ip_int++)); do ip=$(int_to_ip $ip_int) msg_info "Checking IP: $ip" - if ! ping -c 1 -W 1 "$ip" >/dev/null 2>&1; then - [ -n "${SPINNER_PID:-}" ] && kill "$SPINNER_PID" 2>/dev/null && wait "$SPINNER_PID" 2>/dev/null - + if ! ping -c 2 -W 1 "$ip" >/dev/null 2>&1; then NET="$ip/$cidr" - echo -e "${NETWORK}${BOLD}${DGN}Using free IP Address: ${BGN}$NET${CL}" + msg_ok "${NETWORK}${BOLD}${DGN}Using free IP Address: ${BGN}$NET${CL}" sleep 3 break fi