summaryrefslogtreecommitdiffstats
path: root/package/base-files/default/etc/hotplug.d/usb/01-mount
diff options
context:
space:
mode:
authormbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-08-26 01:04:43 +0000
committermbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-08-26 01:04:43 +0000
commit85b201f54538e4198183126a9f00130e2fc01df0 (patch)
tree8c2f29b2a5290c423d69b096ff2608c378ab3412 /package/base-files/default/etc/hotplug.d/usb/01-mount
parent3f494f8d220f2b1a40a6749e814b46eca48792ac (diff)
clean up hotplug mounting scripts
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4673 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/default/etc/hotplug.d/usb/01-mount')
-rw-r--r--package/base-files/default/etc/hotplug.d/usb/01-mount52
1 files changed, 0 insertions, 52 deletions
diff --git a/package/base-files/default/etc/hotplug.d/usb/01-mount b/package/base-files/default/etc/hotplug.d/usb/01-mount
deleted file mode 100644
index c4d356b0d..000000000
--- a/package/base-files/default/etc/hotplug.d/usb/01-mount
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2006 OpenWrt.org
-
-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