Thread
:
Newbie simple HELP! in Scripting! How to check if mmc card is mounted or not?
View Single Post
magick777
2011-09-06 , 12:26
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.
Quote & Reply
|
The Following User Says Thank You to magick777 For This Useful Post:
colin.stephane
magick777
View Public Profile
Send a private message to magick777
Find all posts by magick777