Instead of checking each unit separately, check once at the end. This
should avoid spurious warnings about a service being triggerable by
other stuff.
-* there is nothing to warn about here :)
- $ systemctl stop systemd-udevd.service systemd-udevd-kernel.socket systemd-udevd-control.socket
- Warning: Stopping systemd-udevd.service, but it can still be activated by:
- systemd-udevd-control.socket
- systemd-udevd-kernel.socket
-
* check systemd-tmpfiles for selinux context hookup for mknod(), symlink() and similar
* swap units that are activated by one name but shown in the kernel under another are semi-broken
* check systemd-tmpfiles for selinux context hookup for mknod(), symlink() and similar
* swap units that are activated by one name but shown in the kernel under another are semi-broken
- /* When stopping a unit warn if it can still be triggered by
- * another active unit (socket, path, timer) */
- if (!arg_quiet && streq(method, "StopUnit"))
- check_triggering_units(bus, name);
-
+
+ /* When stopping units, warn if they can still be triggered by
+ * another active unit (socket, path, timer) */
+ if (!arg_quiet && streq(method, "StopUnit")) {
+ if (one_name)
+ check_triggering_units(bus, one_name);
+ else
+ STRV_FOREACH(name, args+1)
+ check_triggering_units(bus, *name);
+ }