summaryrefslogtreecommitdiff
path: root/recipes/linux-hotplug/linux-hotplug-20040329
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/linux-hotplug/linux-hotplug-20040329')
-rw-r--r--recipes/linux-hotplug/linux-hotplug-20040329/busybox.patch13
-rw-r--r--recipes/linux-hotplug/linux-hotplug-20040329/fix-net.agent29
-rw-r--r--recipes/linux-hotplug/linux-hotplug-20040329/logcheck-ignore1
-rwxr-xr-xrecipes/linux-hotplug/linux-hotplug-20040329/update-usb.usermap37
4 files changed, 80 insertions, 0 deletions
diff --git a/recipes/linux-hotplug/linux-hotplug-20040329/busybox.patch b/recipes/linux-hotplug/linux-hotplug-20040329/busybox.patch
new file mode 100644
index 0000000000..7a90f246a5
--- /dev/null
+++ b/recipes/linux-hotplug/linux-hotplug-20040329/busybox.patch
@@ -0,0 +1,13 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- hotplug-2004_03_29/etc/hotplug.d/default/default.hotplug~busybox 2004-03-26 23:34:34.000000000 +0100
++++ hotplug-2004_03_29/etc/hotplug.d/default/default.hotplug 2004-06-18 23:33:22.000000000 +0200
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # This version of /sbin/hotplug should works on most GNU/Linux systems
+ # using Linux 2.2.18+ or 2.4.* kernels. On 2.2.*, only USB has such
diff --git a/recipes/linux-hotplug/linux-hotplug-20040329/fix-net.agent b/recipes/linux-hotplug/linux-hotplug-20040329/fix-net.agent
new file mode 100644
index 0000000000..3bc0935018
--- /dev/null
+++ b/recipes/linux-hotplug/linux-hotplug-20040329/fix-net.agent
@@ -0,0 +1,29 @@
+#!/bin/sh -e
+#
+# Since ifupdown of Debian is different than one of RedHat.
+# So we need to fix it
+
+topdir=$1
+dir=$topdir/etc/hotplug
+test -f $dir/net.agent || exit 1
+mv $dir/net.agent $dir/net.agent.orig
+
+sed -e '/^\*)/i\
+unregister)\
+ # Assume that we want to run ifdown no matter what, \
+ # because it is not going to remove the data from the \
+ # ifstate database otherwise.\
+ if [ -x /sbin/ifdown ]; then\
+ debug_mesg invoke ifdown $INTERFACE\
+ exec /sbin/ifdown $INTERFACE\
+ else\
+ # mesg "how do I bring interfaces up on this distro?"\
+ mesg "E: /sbin/ifdown not found. You need to install ifupdown package"\
+ fi\
+ mesg $1 $ACTION event not handled\
+ ;;\
+' $dir/net.agent.orig > $dir/net.agent
+rm -f $dir/net.agent.orig
+chmod 755 $dir/net.agent
+exit 0
+
diff --git a/recipes/linux-hotplug/linux-hotplug-20040329/logcheck-ignore b/recipes/linux-hotplug/linux-hotplug-20040329/logcheck-ignore
new file mode 100644
index 0000000000..b941353041
--- /dev/null
+++ b/recipes/linux-hotplug/linux-hotplug-20040329/logcheck-ignore
@@ -0,0 +1 @@
+net.agent: invoke if(up|down)
diff --git a/recipes/linux-hotplug/linux-hotplug-20040329/update-usb.usermap b/recipes/linux-hotplug/linux-hotplug-20040329/update-usb.usermap
new file mode 100755
index 0000000000..d09e1176ec
--- /dev/null
+++ b/recipes/linux-hotplug/linux-hotplug-20040329/update-usb.usermap
@@ -0,0 +1,37 @@
+#!/bin/sh -e
+# update-usb.usermap
+# Copyright (c) 2001 Fumitoshi UKAI <ukai@debian.or.jp>
+# GPL
+
+LIBDIR=/usr/lib/hotplug
+USERMAP=/etc/hotplug/usb.usermap
+LOCALMAP=/etc/hotplug/usb.usermap.local
+
+test -d $LIBDIR || exit 0
+
+echo -n "Updating $USERMAP ..."
+
+echo "# usb.usermap file" > $USERMAP
+echo "# This is autogenerated by update-usb.usermap program" >> $USERMAP
+echo "# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info" >> $USERMAP
+
+if [ -f $LOCALMAP ]; then
+ echo "# usb.usermap.local" >> $USERMAP
+ cat $LOCALMAP >> $USERMAP
+fi
+
+cd $LIBDIR
+for package in *
+do
+ if [ -d "$package" ]; then
+ map=$package/usb.usermap
+ echo "# $package" >> $USERMAP
+ if [ -x "$map" ]; then
+ ./$map >> $USERMAP
+ elif [ -f "$map" ]; then
+ cat $map >> $USERMAP
+ fi
+ fi
+done
+
+echo done.