ash_functions: make DEBUG call pass multiline messages one at a time to /tmp/debug.log and kmsg

This commit is contained in:
Thierry Laurion 2023-10-21 14:30:23 -04:00
parent 9e55e08ac0
commit 139f77113c
No known key found for this signature in database
GPG Key ID: E7B4A71658E36A93

View File

@ -24,7 +24,9 @@ warn() {
DEBUG() { DEBUG() {
if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then if [ "$CONFIG_DEBUG_OUTPUT" = "y" ];then
echo "DEBUG: $*" | tee -a /tmp/debug.log /dev/kmsg > /dev/null; echo "DEBUG: $*" | while read line; do
echo "$line" | tee -a /tmp/debug.log /dev/kmsg >/dev/null
done
fi fi
} }