aboutsummaryrefslogtreecommitdiffstats
path: root/packages/linux-hotplug
diff options
context:
space:
mode:
Diffstat (limited to 'packages/linux-hotplug')
-rw-r--r--packages/linux-hotplug/files/mmc.agent51
-rw-r--r--packages/linux-hotplug/linux-hotplug_20040920.bb1
2 files changed, 52 insertions, 0 deletions
diff --git a/packages/linux-hotplug/files/mmc.agent b/packages/linux-hotplug/files/mmc.agent
index e69de29bb2..c8f7026fe3 100644
--- a/packages/linux-hotplug/files/mmc.agent
+++ b/packages/linux-hotplug/files/mmc.agent
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# H3600 Sleeve hotplug policy agent for Linux 2.4 kernels
+#
+# Kernel NET hotplug params include:
+#
+# ACTION=%s [add or remove]
+# MEDIA=%s
+# SLOT=%d
+#
+
+. /etc/hotplug/hotplug.functions
+#DEBUG=yes export DEBUG
+
+ echo "Executing $0 action=$ACTION, media=$MEDIA ($SLOT)" > /dev/console
+
+MMC_MOUNT_OPTIONS="-t auto -o sync,noatime"
+
+if [ -f /etc/sysconfig/hotplug ] ; then
+ . /etc/sysconfig/hotplug
+fi
+
+case `uname -r` in
+2.4*)
+ devpath=mmc/part
+ ;;
+*)
+ devpath=mmcblk0p
+ ;;
+esac
+
+if [ "$ACTION" = "add" ] ; then
+ echo -n add > /dev/console
+ for n in 1 2 3 4 ; do
+ device=/dev/$devpath$n
+ if [ "$n" = "1" ] ; then
+ card=/mnt/card
+ else
+ card=/mnt/card$n
+ fi
+ [ -b $device ] || break
+ echo flash on $device > /dev/console
+ [ -d $card ] || mkdir -p $card
+ mount $MMC_MOUNT_OPTIONS $device $card
+ done
+
+else
+ for card in /mnt/card*; do
+ umount $card
+ done
+fi
diff --git a/packages/linux-hotplug/linux-hotplug_20040920.bb b/packages/linux-hotplug/linux-hotplug_20040920.bb
index e4cb823cab..75846a04de 100644
--- a/packages/linux-hotplug/linux-hotplug_20040920.bb
+++ b/packages/linux-hotplug/linux-hotplug_20040920.bb
@@ -7,6 +7,7 @@ RPROVIDES = "hotplug"
RCONFLICTS = "hotplug"
RREPLACES = "hotplug"
SECTION = "base"
+PR = "r1"
RSUGGESTS = "pciutils usbutils"
SRC_URI = "ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/hotplug-2004_09_20.tar.gz \