Skip to content

Commit 91cbc66

Browse files
committed
ash_functions: make sure newlines are passed, fix error redirection
Signed-off-by: Thierry Laurion <[email protected]>
1 parent cba46e4 commit 91cbc66

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

initrd/etc/ash_functions

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55

66
die() {
77
if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then
8-
echo " !!! ERROR: $* !!!" | tee -a /tmp/debug.log /dev/kmsg > /dev/null;
8+
echo -e " !!! ERROR: $* !!!" | tee -a /tmp/debug.log /dev/kmsg > /dev/null;
99
else
10-
echo >&2 "!!! ERROR: $* !!!";
10+
echo -e "!!! ERROR: $* !!!" > &2;
1111
fi
1212
sleep 2;
1313
exit 1;
1414
}
1515

1616
warn() {
1717
if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then
18-
echo " *** WARNING: $* ***" | tee -a /tmp/debug.log /dev/kmsg > /dev/null;
18+
echo -e " *** WARNING: $* ***" | tee -a /tmp/debug.log /dev/kmsg > /dev/null;
1919
else
20-
echo >&2 " *** WARNING: $* ***";
20+
echo -e " *** WARNING: $* ***" > &2;
2121
fi
2222
sleep 1;
2323
}

0 commit comments

Comments
 (0)