Saturday, December 31, 2011

Disable writing when not mounted

copied from http://wiki.openwrt.org/doc/howto/usb.storage

You may create an empty file to indicate that the disk is not plugged in so that you don't put files directly onto NAND by doing

touch /mnt/usbstorage/USB_DISK_NOT_PRESENT
chmod 444 /mnt/usbstorage -R