From 02bf6c102617ca33853997cdf2372f53b86e959e Mon Sep 17 00:00:00 2001 From: Tiago Date: Sun, 15 Feb 2026 12:05:56 +0000 Subject: [PATCH] Update debian/set_mac_wifi.sh --- debian/set_mac_wifi.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/set_mac_wifi.sh b/debian/set_mac_wifi.sh index eb08a78..51fb22d 100644 --- a/debian/set_mac_wifi.sh +++ b/debian/set_mac_wifi.sh @@ -196,8 +196,12 @@ if [ -n "$1" ]; then TARGET_MAC="$1" log "MAC definido via argumento: $TARGET_MAC" else - # Verificar se é interativo - if [ -t 0 ] && [ -e /dev/tty ]; then + # Verificar se é boot (não interativo e sem /dev/tty disponível) + if [ ! -t 0 ] && [ ! -e /dev/tty ]; then + # Modo boot: Não fazer nada, assumindo que já foi configurado + log "${YELLOW}Modo boot: A saltar configuração de MAC (assumindo que já foi configurado)${NC}" + exit 0 + else # Pergunta ao utilizador se quer gerar um MAC automaticamente if ask_confirmation "Deseja gerar um novo MAC único automaticamente?" "y"; then TARGET_MAC=$(generate_unique_mac)