Why doesn't 'systemctl show --property' verify the property requested and return the correct exit code?

Solution Verified - Updated -

Issue

  • BUG RHEL7 systemctl show --property doesn't verify requested property
  • I want to show the property value but systemctl does not validate whether the requested property exists or not and always returns an exit code of 0. E.G.
  • Where I would have expected to say, "property is invalid/does not exist" and exits with non-zero.
  • systemctl --property doesn't validate if a requested property is valid or not, and always returns with an exit code of 0, regardless of whether the requested property exists or not.

Environment

  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content