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)