Blame SOURCES/patch000-fix_escape_sequence_being_output_under_systemd_service_units.patch

f9f506
diff --git a/etc/rc.d/init.d/functions b/etc/rc.d/init.d/functions
f9f506
index 97f09d13..9b0add1c 100644
f9f506
--- a/etc/rc.d/init.d/functions
f9f506
+++ b/etc/rc.d/init.d/functions
f9f506
@@ -84,8 +84,9 @@ if [ -z "${BOOTUP:-}" ]; then
f9f506
         LOGLEVEL=1
f9f506
     fi
f9f506
 
f9f506
-    # NOTE: /dev/ttyS* is serial console.
f9f506
-    if tty | grep --quiet -e '/dev/ttyS'; then
f9f506
+    # NOTE: /dev/ttyS* is serial console. "not a tty" is such as
f9f506
+    # /dev/null associated when executed under systemd service units.
f9f506
+    if LANG=C tty | grep --quiet -e '\(/dev/ttyS\|not a tty\)'; then
f9f506
         BOOTUP=serial
f9f506
         MOVE_TO_COL=
f9f506
         SETCOLOR_SUCCESS=