summaryrefslogtreecommitdiffstats
path: root/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-10-07 11:57:20 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-10-07 11:57:20 +0000
commit725611a466f2edf12f809d22339b22223af4afe7 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount
parentf4dd5a6d7c4ebea48cd6292744cb9def6037de80 (diff)
move old kamikaze out of trunk - will put buildroot-ng in there as soon as all the developers are ready
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@4944 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount')
-rw-r--r--openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount49
1 files changed, 0 insertions, 49 deletions
diff --git a/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount b/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount
deleted file mode 100644
index c28ada204..000000000
--- a/openwrt/package/base-files/default/etc/hotplug.d/usb/01-mount
+++ /dev/null
@@ -1,49 +0,0 @@
-mount_storage() {
- cd /dev/discs
- for dev in disc*; do
- [ -f /tmp/.${dev}_id ] || {
- echo ${INTERFACE}${PRODUCT} > /tmp/.${dev}_id
- mount | grep /mnt/${dev} || (
- [ -d /mnt/. ] || {
- mkdir -p /tmp/mnt
- ln -s /tmp/mnt /
- }
- cd $dev
- for part in part*; do
- path=/mnt/${dev}_${part##*part}
- mkdir -p ${path}
- mount ${part} ${path}
- done
- )
- }
- done
-}
-
-umount_storage() {
- for tmp in /tmp/.*_id; do
- id=$(cat $tmp 2>&-)
- [ "${INTERFACE}${PRODUCT}" = "$id" ] && {
- rm -f $tmp
- disc=${tmp##*disc}
- disc=${disc%%_id}
- for disc in /mnt/disc${disc}*; do
- umount -f $disc || umount -l $disc
- done
- }
- done
-}
-
-[ -f /proc/bus/usb/devices ] || mount -t usbfs none /proc/bus/usb
-
-case "$ACTION" in
- add)
- case "${INTERFACE%%/*}" in
- 8) mount_storage ;;
- esac
- ;;
- remove)
- case "${INTERFACE%%/*}" in
- 8) umount_storage ;;
- esac
- ;;
-esac