diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 05:58:02 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 05:58:02 (GMT) |
commit | 6bcdc0236ae6c23bc9dd057913716af393af71ea (patch) | |
tree | a4cef43716cfa2040b11ae2ffb5867cd4a7ef6e7 /abs/core-testing/udev/mount-usb | |
parent | 099ccac45c11ee6f96198367e9bea7040c9358c8 (diff) | |
download | linhes_pkgbuild-6bcdc0236ae6c23bc9dd057913716af393af71ea.zip linhes_pkgbuild-6bcdc0236ae6c23bc9dd057913716af393af71ea.tar.gz linhes_pkgbuild-6bcdc0236ae6c23bc9dd057913716af393af71ea.tar.bz2 |
udev:Bumped/Updated for LinHES 7.
Diffstat (limited to 'abs/core-testing/udev/mount-usb')
-rw-r--r-- | abs/core-testing/udev/mount-usb | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/abs/core-testing/udev/mount-usb b/abs/core-testing/udev/mount-usb deleted file mode 100644 index 2d3b3f5..0000000 --- a/abs/core-testing/udev/mount-usb +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - - -DIR=/media -DEVICE=$2 -LABEL=`/lib/udev/vol_id -L /dev/$DEVICE` -FS=`/lib/udev/vol_id -t /dev/$DEVICE` - - -mount_device () { - if [ "$LABEL" == "" ]; - then - mkdir -p $DIR/usb-$DEVICE - case $FS in - vfat) /bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/$DEVICE $DIR/usb-$DEVICE - ;; - *) /bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/$DEVICE $DIR/usb-$DEVICE - ;; - esac - else - mkdir -p $DIR/$LABEL - echo $LABEL >$DIR/.$DEVICE - case $FS in - vfat) /bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/$DEVICE $DIR/$LABEL - ;; - *) /bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/$DEVICE $DIR/$LABEL - ;; - esac - fi -} - -umount_device () { - if [ -e $DIR/usb-$DEVICE ]; - then - umount -l $DIR/usb-$DEVICE - rmdir $DIR/usb-$DEVICE; - else - ULABEL=`cat $DIR/.$DEVICE` - umount -l $DIR/$ULABEL - rmdir $DIR/$ULABEL - rm $DIR/.$DEVICE; - fi -} - -case $1 in - mount) mount_device - ;; - umount) umount_device - ;; - *) echo "Usage: mount-usb mount/umount sdxY" -esac |