Update debian/set_mac_wifi.sh

This commit is contained in:
2026-02-15 12:05:56 +00:00
parent b207f6c38b
commit 02bf6c1026
+6 -2
View File
@@ -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)