Systemd/src/systemctl
Susant Sahani e33a06a1eb systemctl: systemctl show --property' needs verification of property (#3364)
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.

How reproducible:

This works fine:

Id=multi-user.target
But put in a non-existing property:

Id=default.targets.service
Id=default.targets.service
0
[root@shou18lkvm8 ~]# systemctl show --property Id this.is.rubbish; echo $?
Id=this.is.rubbish.service
0

After:

sus@maximus bz-95593]$ ./systemctl show --property Id this.is.rubbish; echo $?
Can't display property this.is.rubbish. Unit this.is.rubbish.service does not
exist.
4

fixes #2295
2016-05-31 18:20:25 +02:00
..
Makefile build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
systemctl.c systemctl: systemctl show --property' needs verification of property (#3364) 2016-05-31 18:20:25 +02:00
systemd-sysv-install.SKELETON systemctl: drop hardcoded chkconfig invocation 2015-05-28 19:42:45 +02:00