~ubuntu-branches/ubuntu/maverick/ltspfs/maverick

« back to all changes in this revision

Viewing changes to scripts/ltspfs_mount

  • Committer: Bazaar Package Importer
  • Author(s): Vagrant Cascadian
  • Date: 2009-04-15 11:41:03 UTC
  • mfrom: (1.1.14 upstream) (4.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090415114103-pn6u6o5gxw4ynuxu
Tags: 0.5.11-3
upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
# ltspfs_mount, passed a directory name, used in /var/run/ltspfs_fstab.
8
8
grep "$1" /var/run/ltspfs_fstab | while read DEV MOUNTPOINT TYPE OPTIONS DUMP PASS; do
9
9
   [ -d ${MOUNTPOINT} ] || mkdir ${MOUNTPOINT}
10
 
   mount -t ${TYPE} -o ${OPTIONS} ${DEV} ${MOUNTPOINT}
11
 
   # Call ltspfs_entry remove if the mount fails and is not a floppy drive
12
 
   if [ "$?" != 0 ]; then
 
10
   # Check if it's already mounted, if not try to mount
 
11
   if ! mountpoint -q ${MOUNTPOINT} && ! mount -t ${TYPE} -o ${OPTIONS} ${DEV} ${MOUNTPOINT} ; then
 
12
        # Call ltspfs_entry remove if the mount fails and is not a floppy drive
13
13
        case $MOUNTPOINT in
14
14
            *floppy*) ;;
15
15
            *) [ -z "$(grep ${MOUNTPOINT} /proc/mounts)" ] && /lib/udev/ltspfs_entry remove ${DEV} ;;