summaryrefslogtreecommitdiff
path: root/openembedded/packages/udev/files
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-02-03 09:02:41 +0000
committerRichard Purdie <richard@openedhand.com>2006-02-03 09:02:41 +0000
commit4a64818533733e194138a45656aaf14d5a123e98 (patch)
tree79925075659d01f3b148e4267138ee6e8de91789 /openembedded/packages/udev/files
parentbc4e7ed8993d3f598e5c03b78838bbc6199413ba (diff)
downloadopenembedded-core-4a64818533733e194138a45656aaf14d5a123e98.tar.gz
openembedded-core-4a64818533733e194138a45656aaf14d5a123e98.tar.bz2
openembedded-core-4a64818533733e194138a45656aaf14d5a123e98.tar.xz
openembedded-core-4a64818533733e194138a45656aaf14d5a123e98.zip
Update to udev 084 from OE. This adds a coldplug script to emulate the calls necessary to load devices already inserted into the system at boot. It also adds a network interface control script.
git-svn-id: https://svn.o-hand.com/repos/poky@247 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/udev/files')
-rwxr-xr-xopenembedded/packages/udev/files/init16
-rw-r--r--openembedded/packages/udev/files/local.rules2
-rw-r--r--openembedded/packages/udev/files/network.sh26
3 files changed, 41 insertions, 3 deletions
diff --git a/openembedded/packages/udev/files/init b/openembedded/packages/udev/files/init
index 6ad6fd581..1022b40c8 100755
--- a/openembedded/packages/udev/files/init
+++ b/openembedded/packages/udev/files/init
@@ -52,9 +52,19 @@ mount_tmpfs() {
mkdir -p /dev/.static/dev
chmod 700 /dev/.static/
- # Make sure it's busybox mount we're using. util-linux mount doesn't handle
- # -o move.
- busybox mount -n -o move /etc/udev /dev/.static/dev
+ # The mount options in busybox are non-standard...
+ if test -x /bin/mount.util-linux
+ then
+ /bin/mount.util-linux --move /etc/udev /dev/.static/dev
+ elif test -x /bin/busybox
+ then
+ busybox mount -n -o move /etc/udev /dev/.static/dev
+ else
+ echo "udev requires an identifiable mount command, not started."
+ umount /etc/udev
+ umount /dev
+ exit 1
+ fi
}
# I hate this hack. -- Md
diff --git a/openembedded/packages/udev/files/local.rules b/openembedded/packages/udev/files/local.rules
index 95b3e1083..4bcaaa8ab 100644
--- a/openembedded/packages/udev/files/local.rules
+++ b/openembedded/packages/udev/files/local.rules
@@ -1,3 +1,5 @@
SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
+SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
+SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
diff --git a/openembedded/packages/udev/files/network.sh b/openembedded/packages/udev/files/network.sh
new file mode 100644
index 000000000..2cfbfa91b
--- /dev/null
+++ b/openembedded/packages/udev/files/network.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Do not run when pcmcia-cs is installed
+test -x /sbin/cardctl && exit 0
+
+# We get two "add" events for hostap cards due to wifi0
+echo "$INTERFACE" | grep -q wifi && exit 0
+
+#
+# Code taken from pcmcia-cs:/etc/pcmcia/network
+#
+
+# if this interface has an entry in /etc/network/interfaces, let ifupdown
+# handle it
+if grep -q "iface \+$INTERFACE" /etc/network/interfaces; then
+ case $ACTION in
+ add)
+ ifup $INTERFACE
+ ;;
+ remove)
+ ifdown $INTERFACE
+ ;;
+ esac
+
+ exit 0
+fi