On Wed, 24 Jan 2018, Lennart Poettering wrote:

You cannot lock device that does not exist. And as soon as it appears it
is mounted.

hu? Thomas' proposed approach of "systemctl lock $DEVICE" also requires there
to be a known path for a device, hence it must already be plugged in
already?

Not necessarily, my aproach just reads a device name, given as parameter and
writes it somewhere.
The device doesn't have to exist therefore.
If the device name is wrong, just nothing would happen, so this seems to be
quite safe.

Using the flock approach makes systemd depending on util-linux.
I'm not sure whether this is ideal.

Regards
Thomas
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to