IgnorantGuru / udevil

Mount without password
http://ignorantguru.github.com/udevil/
GNU General Public License v3.0
130 stars 30 forks source link

Issues when drives already mounted, or when mountpoint already exists #101

Open lukehutch opened 3 years ago

lukehutch commented 3 years ago

When I start devmon, sometimes drives do not automount, and/or do not show up as mounted in the devmon output even though they are mounted. Here are two examples of failures:

# devmon --mount-all --sync
udevil: error 105: mkdir '/media/root/sdc1-usb-S31B1008_USB_DIS' failed
devmon: error mounting /dev/sdc1 (1)
mount: /media/root/USBDISK: /dev/sda1 already mounted on /media/root/USBDISK.
devmon: error mounting /dev/sda1 (32)

In the first case, the directory /media/root/sdc1-usb-S31B1008_USB_DIS was left around by devmon from a previous boot. However, that directory contains the "lockfile" .udevil-mount-point, so if another devmon is not running, then when starting devmon, the directory should simply be used without question.

In the second case, if the disk is already mounted, that should not be an error -- the mounted disk should simply be used by devmon. Instead, the devmon output shows: ismounted: [0] for this drive (which is incorrect, as devmon already determined!).