From 97b1bdd293ada9b36d0e9407bd98f3194abac693 Mon Sep 17 00:00:00 2001 From: Alban Bedel Date: Thu, 16 Mar 2023 13:51:11 +0100 Subject: systemd: Fix systemd when used with busybox less Per default systemd use a pager for the output of most of its tools and it expect this pager to be color capable. But that is not the case when the busybox `less` is used, which lead to output garbled by color escape sequences. To fix this issue add a profile frament that disable the systemd pager when busybox `less` is detected. (From OE-Core rev: 06271fd8d26bc34448524157077c23eb1ea29c52) Signed-off-by: Alban Bedel Signed-off-by: Richard Purdie (cherry picked from commit de7e36a7858ebca4615975967fcad1c399eacdb0) Signed-off-by: Jermain Horsman Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- meta/recipes-core/systemd/systemd/systemd-pager.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/systemd-pager.sh (limited to 'meta/recipes-core/systemd/systemd/systemd-pager.sh') diff --git a/meta/recipes-core/systemd/systemd/systemd-pager.sh b/meta/recipes-core/systemd/systemd/systemd-pager.sh new file mode 100644 index 0000000000..86e3e0ab78 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/systemd-pager.sh @@ -0,0 +1,7 @@ +# Systemd expect a color capable pager, however the less provided +# by busybox is not. This make many interaction with systemd pretty +# annoying. As a workaround we disable the systemd pager if less +# is not the GNU version. +if ! less -V > /dev/null 2>&1 ; then + export SYSTEMD_PAGER= +fi -- cgit v1.2.3-54-g00ecf