device: use UNMANAGED reason instead of REMOVED when unmanaging devices upon quit

Since f85513b (device: do not touch sysctls after the device was removed) the
device is not unconfigured/cleaned up when it's removed. When we're quitting
the device is not actually removed, we're just unmanaging it -- let's just
use a different reason so that the cleanup runs.

Fixes: f85513b8e4
(cherry picked from commit 0f71335d52)
This commit is contained in:
Lubomir Rintel 2015-04-02 08:45:12 -04:00
parent 398681e794
commit c9910b35bd

View file

@ -6856,12 +6856,12 @@ nm_device_set_unmanaged_quitting (NMDevice *self)
/* It's OK to block here because we're quitting */
if (nm_device_is_activating (self) || priv->state == NM_DEVICE_STATE_ACTIVATED)
_set_state_full (self, NM_DEVICE_STATE_DEACTIVATING, NM_DEVICE_STATE_REASON_REMOVED, TRUE);
_set_state_full (self, NM_DEVICE_STATE_DEACTIVATING, NM_DEVICE_STATE_REASON_NOW_UNMANAGED, TRUE);
nm_device_set_unmanaged (self,
NM_UNMANAGED_INTERNAL,
TRUE,
NM_DEVICE_STATE_REASON_REMOVED);
NM_DEVICE_STATE_REASON_NOW_UNMANAGED);
}
/**