diff options
author | Alban Bedel <alban.bedel@aerq.com> | 2023-03-16 13:51:11 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-25 23:00:59 +0000 |
commit | 97b1bdd293ada9b36d0e9407bd98f3194abac693 (patch) | |
tree | a7318356e75180138a3138587d3cf25080d63a21 /meta/recipes-core/systemd/systemd/systemd-pager.sh | |
parent | be80f805d4550621da85b1869b1561d2d20a1fc8 (diff) | |
download | poky-97b1bdd293ada9b36d0e9407bd98f3194abac693.tar.gz |
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 <alban.bedel@aerq.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit de7e36a7858ebca4615975967fcad1c399eacdb0)
Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/systemd-pager.sh')
-rw-r--r-- | meta/recipes-core/systemd/systemd/systemd-pager.sh | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ | |||
1 | # Systemd expect a color capable pager, however the less provided | ||
2 | # by busybox is not. This make many interaction with systemd pretty | ||
3 | # annoying. As a workaround we disable the systemd pager if less | ||
4 | # is not the GNU version. | ||
5 | if ! less -V > /dev/null 2>&1 ; then | ||
6 | export SYSTEMD_PAGER= | ||
7 | fi | ||