]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemctl: rework "systemctl status" a bit 3527/head
authorLennart Poettering <lennart@poettering.net>
Mon, 13 Jun 2016 17:11:26 +0000 (19:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 13 Jun 2016 17:17:14 +0000 (19:17 +0200)
commit3dced37b7c2c9a5c733817569d2bbbaa397adaf7
tree827ff7892c6ebb0fa636559d7dea4e5657c7a64d
parent51e22f8851fae578188bd190510a205f0e4487f4
systemctl: rework "systemctl status" a bit

This reworks "systemctl status" and "systemctl show" a bit. It removes the
definition of the `property_info` structure, because we can simply reuse the
existing UnitStatusInfo type for that.

The "could not be found" message is now printed by show_one() itself (and not
its caller), so that it is shown regardless by who the function is called.
(This makes it necessary to pass the unit name to the function.)

This also adds all properties found to a set, and then checks if any of the
properties passed via "--property=" is mising in it, if so, a proper error is
generated.

Support for checking the PID file of a unit is removed, as this cannot be done
reasonably client side (since the systemd instance we are talking to might sit
on another host)

Replaces: #3411
Fixes: #3425
Also see: #3504
src/systemctl/systemctl.c