Let's ensure that a device once tagged can become active/inactive simply
by toggling the current tag.
Note that this means that a device once tagged with "systemd" will
always have a matching .device unit. However, the active/inactive state
of the unit reflects whether it is currently tagged that way (and
doesn't have SYSTEMD_READY=0 set).
Fixes: #7587
if (device_is_renaming(dev) > 0)
return false;
+ /* Is it really tagged as 'systemd' right now? */
+ if (sd_device_has_current_tag(dev, "systemd") <= 0)
+ return false;
+
if (sd_device_get_property_value(dev, "SYSTEMD_READY", &ready) < 0)
return true;