Check if a mountpoint is active (Entry Nr. 1536, by user 1 | edit) |
|
|
grep -q ' /mount/point ' /proc/mounts && echo 'yeah its mounted'
Here is another version that I saw at episteme.arstechnica.com/groupee/forums/a/tpc/f/96509133/m/105002115731 :
#!/bin/bash
for mount in $(cut -d' ' -f2 < /proc/mounts)
do
if [ "$mount" = "/some/mount/point" ]
then
echo "HOLY BUNGHOLES, BATMAN!";
break
fi
done
|
|
|
Create a new entry at this position
|
|
|