View Single Post
Posts: 167 | Thanked: 204 times | Joined on Jul 2010
#12
It occurs to me that you can save yourself the grep and just check for the readability of a specific path that won't exist unless the SD card is mounted.

Code:
if [ -r "/media/mmc1/systemBackups" ]; then
It may make more sense to check for the path you want to operate on than to check for the mere existence of a microSD. Oh, and if you ever need to know what you've physically got on the system BEFORE it gets mounted, you could try /proc/partitions.
 

The Following User Says Thank You to magick777 For This Useful Post: