Update debian/set_mac_wifi.sh
This commit is contained in:
Vendored
+6
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user