From 64883d4f02cae12f3ec2087bf941af6a4c1ebb50 Mon Sep 17 00:00:00 2001 From: "tiago.aica" Date: Sun, 15 Feb 2026 17:52:34 +0000 Subject: [PATCH] style(debian): add -e flag to echo commands in log functions Enable interpretation of backslash escapes in log messages across all debian scripts for consistent formatting and proper escape sequence handling --- debian/gui_manager.sh | 2 +- debian/set_mac_wifi.sh | 2 +- debian/set_static_ip.sh | 2 +- debian/setup_raspberry.sh | 2 +- debian/upgrade_debian.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/gui_manager.sh b/debian/gui_manager.sh index a779e2f..7c679ad 100644 --- a/debian/gui_manager.sh +++ b/debian/gui_manager.sh @@ -20,7 +20,7 @@ log() { local message="$1" local timestamp=$(date '+%Y-%m-%d %H:%M:%S') # Escreve no ficheiro de log - echo "$timestamp: $message" | tee -a "$LOG_FILE" + echo -e "$timestamp: $message" | tee -a "$LOG_FILE" # Envia para o syslog (opcional) logger -t "gui_manager" "$message" } diff --git a/debian/set_mac_wifi.sh b/debian/set_mac_wifi.sh index b888977..ee91ffb 100644 --- a/debian/set_mac_wifi.sh +++ b/debian/set_mac_wifi.sh @@ -18,7 +18,7 @@ log() { local timestamp=$(date '+%Y-%m-%d %H:%M:%S') # Escreve no ficheiro de log - echo "$timestamp: $message" | tee -a "$LOG_FILE" + echo -e "$timestamp: $message" | tee -a "$LOG_FILE" # Envia para o syslog (opcional) logger -t "network_config" "$message" diff --git a/debian/set_static_ip.sh b/debian/set_static_ip.sh index f38af78..de29fe6 100644 --- a/debian/set_static_ip.sh +++ b/debian/set_static_ip.sh @@ -24,7 +24,7 @@ log() { local timestamp=$(date '+%Y-%m-%d %H:%M:%S') # Escreve no ficheiro de log - echo "$timestamp: $message" | tee -a "$LOG_FILE" + echo -e "$timestamp: $message" | tee -a "$LOG_FILE" # Envia para o syslog (opcional) logger -t "set_static_ip" "$message" diff --git a/debian/setup_raspberry.sh b/debian/setup_raspberry.sh index cfee1f6..dc0252d 100644 --- a/debian/setup_raspberry.sh +++ b/debian/setup_raspberry.sh @@ -24,7 +24,7 @@ log() { local timestamp=$(date '+%Y-%m-%d %H:%M:%S') # Escreve no ficheiro de log - echo "$timestamp: $message" | tee -a "$LOG_FILE" + echo -e "$timestamp: $message" | tee -a "$LOG_FILE" # Envia para o syslog (opcional) logger -t "raspberry_setup" "$message" diff --git a/debian/upgrade_debian.sh b/debian/upgrade_debian.sh index 2ee4d47..0782528 100644 --- a/debian/upgrade_debian.sh +++ b/debian/upgrade_debian.sh @@ -21,7 +21,7 @@ log() { local timestamp=$(date '+%Y-%m-%d %H:%M:%S') # Escreve no ficheiro de log - echo "$timestamp: $message" | tee -a "$LOG_FILE" + echo -e "$timestamp: $message" | tee -a "$LOG_FILE" # Envia para o syslog (opcional) logger -t "debian_upgrade" "$message"