summaryrefslogtreecommitdiffstats
path: root/meta/packages/linux-hotplug/files/mmc.agent
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/linux-hotplug/files/mmc.agent
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/linux-hotplug/files/mmc.agent')
-rwxr-xr-xmeta/packages/linux-hotplug/files/mmc.agent52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/packages/linux-hotplug/files/mmc.agent b/meta/packages/linux-hotplug/files/mmc.agent
new file mode 100755
index 0000000000..a80daa4603
--- /dev/null
+++ b/meta/packages/linux-hotplug/files/mmc.agent
@@ -0,0 +1,52 @@
1#!/bin/sh
2#
3# H3600 Sleeve hotplug policy agent for Linux 2.4 kernels
4#
5# Kernel NET hotplug params include:
6#
7# ACTION=%s [add or remove]
8# MEDIA=%s
9# SLOT=%d
10#
11
12. /etc/hotplug/hotplug.functions
13#DEBUG=yes export DEBUG
14
15 echo "Executing $0 action=$ACTION, media=$MEDIA ($SLOT)" > /dev/console
16
17MMC_MOUNT_OPTIONS="-t auto -o sync,noatime"
18
19if [ -f /etc/sysconfig/hotplug ] ; then
20 . /etc/sysconfig/hotplug
21fi
22
23case `uname -r` in
242.4*)
25 devpath=mmc/part
26 ;;
27*)
28 devpath=mmcblk0p
29 ;;
30esac
31
32if [ "$ACTION" = "add" ] ; then
33 sleep 4
34 echo -n add > /dev/console
35 for n in 1 2 3 4 ; do
36 device=/dev/$devpath$n
37 if [ "$n" = "1" ] ; then
38 card=/mnt/card
39 else
40 card=/mnt/card$n
41 fi
42 [ -b $device ] || break
43 echo " flash on $device" > /dev/console
44 [ -d $card ] || mkdir -p $card
45 mount $MMC_MOUNT_OPTIONS $device $card
46 done
47
48else
49 for card in /mnt/card*; do
50 umount $card
51 done
52fi