diff options
author | Franck Bui <fbui@suse.com> | 2016-01-22 07:18:19 +0100 |
---|---|---|
committer | Franck Bui <fbui@suse.com> | 2016-01-22 13:53:00 +0100 |
commit | ac9d396b2abbae4e7ab84f7b556f70681b66236b (patch) | |
tree | 40f5de3c22988d4ef3d097e45570dc5ed5af2cca /units/network-pre.target | |
parent | ca9ec350f39096f19d6672e38ca2419877627a4b (diff) |
device: make sure to not ignore re-plugged device
systemd automatically mounts device unless 'noauto' is part of the
mount options. This can happen during boot if the device is plugged at
that time or later when the system is already running (the latter case
is not documented AFAICS).
After the systemd booted, I plugged my USB device which had an entry
in /etc/fstab with the default options and systemd automatically
mounted it.
However I noticed that if I unplugged and re-plugged the device the
automatic mounting of the device didn't work anymore: systemd didn't
notice that the device was re-plugged.
This was due to the device unit which was not recycled by the GC
during the unplug event because in the case of automounting, the mount
unit still referenced it. When the device was re-plugged, the old
device unit was reused but it still had the old sysfs path (amongst
other useful information).
Systemd was confused by the stalled sysfs path and decided to ignore
the plug event.
This patch fixes this issue by simply not doing the sanity checking on
the sysfs path if the device is in unplugged state.
Diffstat (limited to 'units/network-pre.target')
0 files changed, 0 insertions, 0 deletions