linux - Delete mounting directory after umount -l -


i'm working on linux openwrt have mount , umount manually usb disks when attached router.

i'm using script: http://wiki.openwrt.org/doc/howto/writable_ntfs#with.a.custom.hotplug.script mount , unmount automatically usb disks problem doesn't delete mounting directory after umount -l /dev/$device. application on router needs check if usb disk present or not checking if /mnt/sda1 exists or not

my question is: dangerous add rm -r sda1 after umount -l /dev/$device, or there risk rm -r sda1 remove files in sda1 ?

it should safe delete directory after umount if check success of umount command before suggest change script check if mountpoint it's listed in mount table instead mount | grep sda1


Comments