On Mon, Nov 22, 2010 at 7:49 AM, Binand Sethumadhavan binand@gmail.com wrote:
All mounted filesystems have an entry in /proc/mounts. Your script can take advantage of this.
if ! grep -q /backup /proc/mounts; then if ! mount -t ext3 /dev/sdb1 /backup; then exit 1; # Mount failed, bail out fi fi
another non-portable way of checking it is df -l.
Regards, NMK.