summaryrefslogtreecommitdiff
path: root/.wmii/util.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-10-15 18:59:31 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-10-15 20:22:27 -0400
commitb18a02654e2c8b4a91f7c97352b75464e24c6edb (patch)
treec25981c27e6c31b47406bb138c219491cac65a88 /.wmii/util.sh
parent198455ac623054f46b4da3fec040fb7cb0494ce1 (diff)
wmii: redo the mount/unmount and quit code
Diffstat (limited to '.wmii/util.sh')
-rw-r--r--.wmii/util.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/.wmii/util.sh b/.wmii/util.sh
index 3234783..43d7d4a 100644
--- a/.wmii/util.sh
+++ b/.wmii/util.sh
@@ -31,6 +31,13 @@ expand_variables() {
done
}
+is_mounted() {
+ dir="$(readlink -m $1)"
+ mntpnt="$(cut -d' ' -f2 /proc/mounts|grep -- "$dir")"
+ [[ $dir = "$mntpnt" ]]
+ return $?
+}
+
################################################################################
# PATH manipulation #
################################################################################