eeb1542b5e
Add a simple check on the number of unit files that were found: return `-ENOENT` when none is found from the function and thus `systemctl` consequently exits with `1` (`EXIT_FAILURE`) if none were found. Verification: ```bash root@image:~# systemctl list-unit-files dbus-nonexistant.service; echo $? UNIT FILE STATE VENDOR PRESET 0 unit files listed. 1 root@image:~# systemctl list-unit-files dbus.service; echo $? UNIT FILE STATE VENDOR PRESET dbus.service static enabled 1 unit files listed. 0 ``` Fixes #15082. |
||
---|---|---|
.. | ||
systemctl.c | ||
systemd-sysv-install.SKELETON | ||
sysv-compat.c | ||
sysv-compat.h |