core: add Manager::honor_device_enumeration flag
When system manager is started first time or after switching root, then the udev's device tag data do not exist yet. So, let's not honor the enumeration results. Fixes #11997.
This commit is contained in:
+5
-1
@@ -666,9 +666,13 @@ static void device_found_changed(Device *d, DeviceFound previous, DeviceFound no
|
||||
}
|
||||
|
||||
static void device_update_found_one(Device *d, DeviceFound found, DeviceFound mask) {
|
||||
Manager *m;
|
||||
|
||||
assert(d);
|
||||
|
||||
if (MANAGER_IS_RUNNING(UNIT(d)->manager)) {
|
||||
m = UNIT(d)->manager;
|
||||
|
||||
if (MANAGER_IS_RUNNING(m) && (m->honor_device_enumeration || MANAGER_IS_USER(m))) {
|
||||
DeviceFound n, previous;
|
||||
|
||||
/* When we are already running, then apply the new mask right-away, and trigger state changes
|
||||
|
||||
Reference in New Issue
Block a user