diff options
author | Alban Bedel <alban.bedel@aerq.com> | 2020-11-03 16:13:34 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-11-13 14:32:00 +0000 |
commit | 35a939b7bae5c1ec683ef2a5c2f56a136ae34950 (patch) | |
tree | 963735ddca5f4203263caa0f49ae27dabdbbc2dc /meta/recipes-core/systemd/systemd/systemd-pager.sh | |
parent | f35343550ad11c8484f7e9d2c164a487c8fecc2a (diff) | |
download | poky-35a939b7bae5c1ec683ef2a5c2f56a136ae34950.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: de7e36a7858ebca4615975967fcad1c399eacdb0)
Signed-off-by: Alban Bedel <alban.bedel@aerq.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 | ||