[systemd-devel] The behavious of systemctl [from fedora-devel]

Aaron Sowry aaron+rh at aeneby.se
Mon Jun 20 00:09:25 PDT 2011


Hello,

I've been wanting to discuss the default behaviour of systemctl, which I began
doing on fedora-devel (see [1] for start of thread) before it was pointed out
that systemd-devel is probably a more appropriate place for discussion.

For those who can't be bothered reading through the original thread, I'll try to
summarise:

systemctl implements a lot of default behaviours which differ depending on
whether the output is tty or not. These include:

- Automatically forking a pager and piping output to it if the output is tty.
  This results in a number of problems, including RH #713707 which means that
  the user will get no output on tty if there is no supported pager available.
  --no-pager has been provided to disable this, and $SYSTEMD_PAGER is being
  considered[2] as a workaround for non-supported pagers.

- Column headers will be displayed on tty, but not otherwise. The assumption
  here seems to be that output to non-tty channels is not destined for human
  eyes. Currently, there is no way to force column headers on non-tty channels.

- It has been suggested[3] that --full is implicit when outputting to non-tty
  channels, however I am unable to reproduce this behaviour on Fedora 15.
  Assuming that this will be the default behaviour though, we have a similar
  problem to the point above, since there is currently no way to disable --full
  on non-tty channels.

As far as I see it, then, we have two options:

1) Continue providing workarounds such as $SYSTEMD_PAGER (and possibly something
   like --no-full and --force-headers) to mitigate behaviour imposed on users by
   developers; or

2) Stop making assumptions about what users want, and simply send output to 
   stdout in all cases unless the user specifies otherwise.

In case it wasn't obvious, I am in favour of 2).

Thanks.
Aaron


[1] http://lists.fedoraproject.org/pipermail/devel/2011-June/152993.html
[2] https://bugs.freedesktop.org/show_bug.cgi?id=38439
[3] http://lists.fedoraproject.org/pipermail/devel/2011-June/153037.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110620/de239459/attachment.pgp>


More information about the systemd-devel mailing list