[CentOS] systemctl behaves like it is being piped to less in centos 8?

Fri Dec 13 16:43:22 UTC 2019
Tony Mountifield <tony at softins.co.uk>

In article <CAHEKYV6qBgyxAQPDk-sNBOoY8K3MBmeeZArxQbE02UFLeknMQg at mail.gmail.com>,
Mauricio Tavares <raubvogel at gmail.com> wrote:
> Comparing the output of systemctl between centos 7 and 8:
> 
> [...]
> 
> So far so good. Don't know why it is complaining about log being
> rotated but output looks readable. Now, let's grab a centos8 box:
> 
> [raub at vmhost2 ~]$ cat /etc/redhat-release
> CentOS Linux release 8.0.1905 (Core)
> [raub at vmhost2 ~]$ systemctl status firewalld
> ● firewalld.service - firewalld - dynamic firewall daemon
>    Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor p>
>    Active: active (running) since Tue 2019-12-10 20:10:20 EST; 2 days ago
>      Docs: man:firewalld(1)
>  Main PID: 1031 (firewalld)
>     Tasks: 2 (limit: 26213)
>    Memory: 33.5M
>    CGroup: /system.slice/firewalld.service
>            └─1031 /usr/libexec/platform-python -s /usr/sbin/firewalld --nofork >
> lines 1-9/9 (END)
> 
> As you can see, it is trimming the output at the end of my terminal
> window, which I do not care; there are options (-i I think) to make it
> wrap around, but the line
> 
> lines 1-9/9 (END)
> 
> is what is annoying me. That seems to be what I would expect if I
> piped it to less. I checked a fedora 31 and another centos 8 box and
> am seeing the same behaviour. Am I missing something?

See https://bugzilla.redhat.com/show_bug.cgi?id=713567 for info. It's
more of the systemd-mindset disease, and Schmidt looked to be pretty
intransigent in the face of concerted objection some years ago.

You either have to use: systemctl --no-pager status firewalld
Or you have to first do: export SYSTEMD_PAGER=

Maybe you could put the latter into a file in /etc/profile.d to make
it system-wide:

# echo 'export SYSTEMD_PAGER=' >>/etc/profile.d/systemd.sh
# echo 'setenv SYSTEMD_PAGER ""' >>/etc/profile.d/systemd.csh

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org