summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev/files/udevsynthesize.sh
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-core/udev/files/udevsynthesize.sh
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/udev/files/udevsynthesize.sh')
-rw-r--r--meta/recipes-core/udev/files/udevsynthesize.sh51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-core/udev/files/udevsynthesize.sh b/meta/recipes-core/udev/files/udevsynthesize.sh
new file mode 100644
index 0000000000..d58217c144
--- /dev/null
+++ b/meta/recipes-core/udev/files/udevsynthesize.sh
@@ -0,0 +1,51 @@
1#!/bin/sh -e
2
3load_input_modules() {
4 for module in mousedev evdev joydev; do
5 modprobe -q $module || true
6 done
7}
8
9if [ ! -e /sys/class/mem/null/uevent ]; then # <= 2.6.14
10 /lib/udev/udevsynthesize
11 load_input_modules
12 exit 0
13fi
14
15# replace $IFS with something which is not likely to appear in a sysfs path,
16# because some buggy drivers have spaces in their names
17oldifs="$IFS"
18IFS="|"
19
20for file in /sys/bus/*/devices/*/uevent /sys/class/*/*/uevent \
21 /sys/block/*/uevent /sys/block/*/*/uevent; do
22 case "$file" in
23 */device/uevent) ;; # skip followed device symlinks
24 */\*/*) ;;
25
26 */class/mem/*) # for /dev/null
27 first="$first${IFS}$file" ;;
28
29 */block/md[0-9]*)
30 last="$last${IFS}$file" ;;
31
32 *)
33 default="$default${IFS}$file" ;;
34 esac
35done
36
37for file in $first${IFS}$default${IFS}$last; do
38 [ "$file" ] || continue
39 echo 'add' > "$file" || true
40done
41
42IFS="$oldifs"
43
44case "$(uname -r)" in
45 2.6.1[0-5]|2.6.1[0-5][!0-9]*) # <= 2.6.15
46 load_input_modules
47 ;;
48esac
49
50exit 0
51