From 91cbc66e98ef4f171f1f7e85c29b8c12fd3785e6 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Sun, 1 Sep 2024 15:53:39 -0400 Subject: [PATCH] ash_functions: make sure newlines are passed, fix error redirection Signed-off-by: Thierry Laurion --- initrd/etc/ash_functions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/initrd/etc/ash_functions b/initrd/etc/ash_functions index 54b721085..8daea0146 100644 --- a/initrd/etc/ash_functions +++ b/initrd/etc/ash_functions @@ -5,9 +5,9 @@ die() { if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then - echo " !!! ERROR: $* !!!" | tee -a /tmp/debug.log /dev/kmsg > /dev/null; + echo -e " !!! ERROR: $* !!!" | tee -a /tmp/debug.log /dev/kmsg > /dev/null; else - echo >&2 "!!! ERROR: $* !!!"; + echo -e "!!! ERROR: $* !!!" > &2; fi sleep 2; exit 1; @@ -15,9 +15,9 @@ die() { warn() { if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then - echo " *** WARNING: $* ***" | tee -a /tmp/debug.log /dev/kmsg > /dev/null; + echo -e " *** WARNING: $* ***" | tee -a /tmp/debug.log /dev/kmsg > /dev/null; else - echo >&2 " *** WARNING: $* ***"; + echo -e " *** WARNING: $* ***" > &2; fi sleep 1; }