From 44c51a1730d9304f5f5754e3b63419040aa78729 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Mon, 6 Feb 2006 21:24:10 +0000 Subject: Some tests with SuSE 10.1 revealed bugs in mkdxsinitrd. Added configuration and functions ... git-svn-id: http://svn.openslx.org/svn/openslx/dxs/ld4@63 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/etc/functions | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'initrd/initrd-stuff/etc/functions') diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index 4125acf5..bb834756 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -10,7 +10,34 @@ # # Version: 0.4.1b +####################################################################### +# generate events with the sysfs trigger +function trigger_device_events() { + list=$(echo /sys/bus/*/devices/*/uevent) + list="$list $(echo /sys/class/*/*/uevent)" + list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)" + for i in $list; do + case "$i" in + */device/uevent|*\**) + continue + ;; + */class/mem/*|*/class/tty/*) + first="$first $i" + ;; + */block/md*) + last="$last $i" + ;; + */*) + default="$default $i" + ;; + esac + done + # trigger the sorted events + for i in \$first \$default \$last; do + echo "add" > "\$i" + done +} ####################################################################### # produce error message and if $2 is empty run (debug) shell -- cgit v1.2.3-55-g7522