Bug#765175: systemd init script integration: status action should use --lines=0
Gerben Meijer
gerben at daybyday.nl
Thu Apr 28 22:26:26 BST 2016
On 28/04/16 23:14, Michael Biebl wrote:
> Do we? If I run /etc/init.d/foo status on a terminal having a pager
> might be useful.
> I was under the impression that the systemctl command detects if you are
> running it from a terminal or not and disables the pager in the latter case.
It may be useful, but sysv initscripts are never expected to invoke a
pager. If user wants to see paged status, 'systemctl status foo' is
adequate. What's worse, it can't be skipped - passing arguments after
'/etc/init.d/foo status' isn't supported by the lsb init-functions
wrapper; only when invoking systemctl directly can this be done.
As far as detection on a terminal goes, if I run some program or script
that does a sysv style '/etc/init.d/foo status' as part of a service
check (re Vagrant in my report) it will block - and in this case it
blocks 5 times, once for each /etc/init.d/foo status call. There is no
way around this other than to hack the source.
IMHO it's a matter of reasonable defaults; for 'systemctl status foo' a
pager is expected, for '/etc/init.d/foo status' historically it is not
and I feel this should be honored for compatibility reasons.
More information about the Pkg-systemd-maintainers
mailing list