From 5e7b3c5df445f3493244a72b1e691f18b2c9fee1 Mon Sep 17 00:00:00 2001 From: mfrasca <> Date: Thu, 19 Oct 2006 17:37:16 +0000 Subject: [PATCH] not necessary: it has been implemented directly in python (pywmhdmon) --- examples/tmount | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 examples/tmount diff --git a/examples/tmount b/examples/tmount deleted file mode 100644 index 943ffac..0000000 --- a/examples/tmount +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# tmount - toggle mount / eject -# -# usage: tmount mountpoint ejectable -# -# parameter mountpoint: the mount point, without trailing '/' -# ejectable: not empty indicates that the media is software ejectable -# action: if the indicated file system is not mounted, mounts it -# otherwise unmounts it -# if mounting fails or when unmounting, ejects software ejectable -# media. - -if [ "$2" == "" ]; then eject=echo -else eject=eject -fi - -mountpointIndicated=$1 -mountpointFound=`df $1 | tail -1 | cut -d% -f2` - -if [ $mountpointIndicated = $mountpointFound ] - then - - umount $mountpointIndicated - $eject $mountpointIndicated - -else - - # my smartmedia does not mount correctly after a media change - # second try always succeeds. ask me why! if neither mount - # attempt succeeds, then attempt ejecting ejectable media - - mount $mountpointIndicated || mount $mountpointIndicated || $eject $mountpointIndicated - -fi