diff options
author | Richard Purdie <richard@openedhand.com> | 2006-02-03 09:02:41 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-02-03 09:02:41 +0000 |
commit | 4a64818533733e194138a45656aaf14d5a123e98 (patch) | |
tree | 79925075659d01f3b148e4267138ee6e8de91789 /openembedded/packages/udev/udev-084/udevsynthesize.sh | |
parent | bc4e7ed8993d3f598e5c03b78838bbc6199413ba (diff) | |
download | openembedded-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/udev-084/udevsynthesize.sh')
-rw-r--r-- | openembedded/packages/udev/udev-084/udevsynthesize.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/openembedded/packages/udev/udev-084/udevsynthesize.sh b/openembedded/packages/udev/udev-084/udevsynthesize.sh new file mode 100644 index 000000000..d58217c14 --- /dev/null +++ b/openembedded/packages/udev/udev-084/udevsynthesize.sh @@ -0,0 +1,51 @@ +#!/bin/sh -e + +load_input_modules() { + for module in mousedev evdev joydev; do + modprobe -q $module || true + done +} + +if [ ! -e /sys/class/mem/null/uevent ]; then # <= 2.6.14 + /lib/udev/udevsynthesize + load_input_modules + exit 0 +fi + +# replace $IFS with something which is not likely to appear in a sysfs path, +# because some buggy drivers have spaces in their names +oldifs="$IFS" +IFS="|" + +for file in /sys/bus/*/devices/*/uevent /sys/class/*/*/uevent \ + /sys/block/*/uevent /sys/block/*/*/uevent; do + case "$file" in + */device/uevent) ;; # skip followed device symlinks + */\*/*) ;; + + */class/mem/*) # for /dev/null + first="$first${IFS}$file" ;; + + */block/md[0-9]*) + last="$last${IFS}$file" ;; + + *) + default="$default${IFS}$file" ;; + esac +done + +for file in $first${IFS}$default${IFS}$last; do + [ "$file" ] || continue + echo 'add' > "$file" || true +done + +IFS="$oldifs" + +case "$(uname -r)" in + 2.6.1[0-5]|2.6.1[0-5][!0-9]*) # <= 2.6.15 + load_input_modules + ;; +esac + +exit 0 + |