In the first case, according to the help menu (lock -h), I suppose it just creates a file in the /var/lock dir and stores the current PID into it. But in the second one, I would suppose that it would just remove the specified lock file or something similar. But when I do some command-line testing with this -u parameter, nothing happens. I don't get what it's supposed to do…
Does someone have an explanation, please ?
(since you wrote the document, @vgaetera, maybe ?)
Using a lockfile helps avoid concurrent jobs triggered by multiple hotplug events.
Unlocking and preserving the lockfile indicates the hotplug script has finished its job.