J
J
juffinhalli2012-09-18 08:52:49
linux
juffinhalli, 2012-09-18 08:52:49

Udev How to safely remove a flash drive?

Good afternoon!
I found a rule for udev that automatically mounts flash drives
The rule itself
And now the question is - how can Udev mount a removable disk (rule 5) if the device is already “remove”?
UPD The script works fine. The flash drive is mounted. If you pull out the flash drive, the folder with the device name is deleted. There are no external issues. I'm just trying to understand the logic of the script.
What is the point of unmounting the device in the 5th rule, if the device is not already in the system - I pulled out the USB flash drive. But it is precisely for this event that the “flash drive is pulled out” rules 5-8 begin to work.
PS How to make sure that the flash drive can be safely pulled out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sdevalex, 2012-09-18
@sdevalex

Might be a typo...and it's true.

RUN+="/bin/umount /mnt/%k" 

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question