r941 - trunk/udev

jim at linuxfromscratch.org jim at linuxfromscratch.org
Tue Dec 20 00:11:03 PST 2005


Author: jim
Date: 2005-12-20 01:11:03 -0700 (Tue, 20 Dec 2005)
New Revision: 941

Added:
   trunk/udev/85-mount-fstab.rules
Removed:
   trunk/udev/80-sysconfig.rules
   trunk/udev/firmware.sh
Modified:
   trunk/udev/
   trunk/udev/50-udev.rules
   trunk/udev/60-persistent.rules
   trunk/udev/95-debug.rules
   trunk/udev/Makefile
   trunk/udev/show_event_log
   trunk/udev/udev
   trunk/udev/udev.makechanges
Log:
 r1154 at server:  jim | 2005-12-20 00:10:39 -0800
 Updates from Upstream



Property changes on: trunk/udev
___________________________________________________________________
Name: svk:merge
   - 3949c430-d905-0410-97b6-f115d20341b5:/udev:1050
   + 3949c430-d905-0410-97b6-f115d20341b5:/udev:1154

Modified: trunk/udev/50-udev.rules
===================================================================
--- trunk/udev/50-udev.rules	2005-12-20 07:23:06 UTC (rev 940)
+++ trunk/udev/50-udev.rules	2005-12-20 08:11:03 UTC (rev 941)
@@ -174,4 +174,4 @@
 SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
 
 # kernel firmware loader
-SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh"
+SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware_helper"

Modified: trunk/udev/60-persistent.rules
===================================================================
--- trunk/udev/60-persistent.rules	2005-12-20 07:23:06 UTC (rev 940)
+++ trunk/udev/60-persistent.rules	2005-12-20 08:11:03 UTC (rev 941)
@@ -59,6 +59,6 @@
 KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
 KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
 
-KERNEL=="dm-[0-9]*", ACTION=="add", PROGRAM="/sbin/dmsetup info -c --noheadings -o name -j %M -m %m", SYMLINK="disk/by-name/%c"
+KERNEL=="dm-[0-9]*", ACTION=="add", PROGRAM="/sbin/dmsetup info -c --noopencount --noheadings -o name -j %M -m %m", SYMLINK="disk/by-name/%c"
 
 LABEL="persistent_end"

Deleted: trunk/udev/80-sysconfig.rules
===================================================================
--- trunk/udev/80-sysconfig.rules	2005-12-20 07:23:06 UTC (rev 940)
+++ trunk/udev/80-sysconfig.rules	2005-12-20 08:11:03 UTC (rev 941)
@@ -1,24 +0,0 @@
-########################################################################
-#
-# Description : Sysconfig Rules Set
-#
-# Authors     : Based on Open Suse Udev Rules
-#               kay.sievers at suse.de
-#
-# Adapted to  : Jim Gifford
-# LFS
-#
-# Version     : 00.01
-#
-# Notes       :
-#
-########################################################################
-
-ENV{SYSCONFIG}=="no|off|0", GOTO="sysconfig_end"
-
-# network devices
-KERNEL=="tun", NAME="net/%k", MODE="0600"
-SUBSYSTEM=="net", ACTION=="add", RUN+="/sbin/ifup $env{INTERFACE} -o hotplug"
-SUBSYSTEM=="net", ACTION=="remove", RUN+="/sbin/ifdown %k -o hotplug"
-
-LABEL="sysconfig_end"

Added: trunk/udev/85-mount-fstab.rules
===================================================================
--- trunk/udev/85-mount-fstab.rules	2005-12-20 07:23:06 UTC (rev 940)
+++ trunk/udev/85-mount-fstab.rules	2005-12-20 08:11:03 UTC (rev 941)
@@ -0,0 +1,17 @@
+########################################################################
+#
+# Description : Sysconfig Rules Set
+#
+# Authors     : Based on Open Suse Udev Rules
+#               kay.sievers at suse.de
+#
+# Adapted to  : Jim Gifford
+# LFS
+#
+# Version     : 00.01
+#
+# Notes       :
+#
+########################################################################
+
+SUBSYSTEM=="block", ACTION=="add", KERNEL=="sd*[0-9]|hd*[0-9]", RUN+="mount.sh"

Modified: trunk/udev/95-debug.rules
===================================================================
--- trunk/udev/95-debug.rules	2005-12-20 07:23:06 UTC (rev 940)
+++ trunk/udev/95-debug.rules	2005-12-20 08:11:03 UTC (rev 941)
@@ -15,7 +15,7 @@
 ########################################################################
 
 # debug events to /events, but not on default udev_log="err"
-ENV{UDEV_LOG}=="[4-9]", RUN+="/lib/udev/eventrecorder.sh"
+ENV{UDEV_LOG}=="[4-9]", RUN+="eventrecorder.sh"
 
 # event to be catched by udevmonitor
 RUN+="socket:/org/kernel/udev/monitor"

Modified: trunk/udev/Makefile
===================================================================
--- trunk/udev/Makefile	2005-12-20 07:23:06 UTC (rev 940)
+++ trunk/udev/Makefile	2005-12-20 08:11:03 UTC (rev 941)
@@ -12,14 +12,13 @@
 	install -m ${RULESMODE} 05-udev-early.rules ${DESTDIR}/etc/udev/rules.d/05-udev-early.rules
 	install -m ${RULESMODE} 50-udev.rules ${DESTDIR}/etc/udev/rules.d/50-udev.rules
 	install -m ${RULESMODE} 60-persistent.rules ${DESTDIR}/etc/udev/rules.d/60-persistent.rules
-	install -m ${RULESMODE} 80-sysconfig.rules ${DESTDIR}/etc/udev/rules.d/80-sysconfig.rules
+	install -m ${RULESMODE} 85-mount-fstab.rules ${DESTDIR}/etc/udev/rules.d/85-mount-fstab.rules
 	install -m ${RULESMODE} 95-debug.rules ${DESTDIR}/etc/udev/rules.d/95-debug.rules
 
 scripts:
 	install -m ${SCRIPTMODE} remove_floppy_devices.sh ${DESTDIR}/lib/udev/remove_floppy_devices.sh
 	install -m ${SCRIPTMODE} load_floppy_module.sh ${DESTDIR}/lib/udev/load_floppy_module.sh
 	install -m ${SCRIPTMODE} ide.sh ${DESTDIR}/lib/udev/ide.sh
-	install -m ${SCRIPTMODE} firmware.sh ${DESTDIR}/lib/udev/firmware.sh
 	install -m ${SCRIPTMODE} input.sh ${DESTDIR}/lib/udev/input.sh
 	install -m ${SCRIPTMODE} mount.sh ${DESTDIR}/lib/udev/mount.sh
 	install -m ${CONFMODE} scsi_id.config ${DESTDIR}/etc/scsi_id.config

Deleted: trunk/udev/firmware.sh
===================================================================
--- trunk/udev/firmware.sh	2005-12-20 07:23:06 UTC (rev 940)
+++ trunk/udev/firmware.sh	2005-12-20 08:11:03 UTC (rev 941)
@@ -1,39 +0,0 @@
-#!/bin/sh
-########################################################################
-#
-# Description : Firmware Script
-#
-# Authors     : Based on Open Suse Udev Rules
-#               kay.sievers at suse.de
-#
-# Adapted to  : Jim Gifford
-# LFS
-#
-# Version     : 00.00
-#
-# Notes       :
-#
-########################################################################
-
-. /etc/sysconfig/rc
-. ${rc_functions}
-
-FIRMWARE_DIRS="/lib/firmware"
-
-if [ ! -e /sys/$DEVPATH/loading ]; then
-    boot_mesg "firmware loader misses sysfs directory"
-    exit 0
-fi
-
-for DIR in $FIRMWARE_DIRS; do
-    [ -e "$DIR/$FIRMWARE" ] || continue
-    boot_mesg "loading $DIR/$FIRMWARE"
-    echo 1 > /sys/$DEVPATH/loading
-    cat "$DIR/$FIRMWARE" > /sys/$DEVPATH/data
-    echo 0 > /sys/$DEVPATH/loading
-    exit
-done
-
-echo -1 > /sys/$DEVPATH/loading
-boot_mesg "Cannot find  firmware file '$FIRMWARE'"
-exit 1

Modified: trunk/udev/show_event_log
===================================================================
--- trunk/udev/show_event_log	2005-12-20 07:23:06 UTC (rev 940)
+++ trunk/udev/show_event_log	2005-12-20 08:11:03 UTC (rev 941)
@@ -68,6 +68,6 @@
 exit
 
 # list all events
-(read x; while read x s x x x c x; read x s2 x a d; do echo $s $s2 $a $c $d; done) < <( sed -n "s/^.*udev.*\(seq [0-9]* [qf].*$\)/\1/p" /var/log/messages | sort -n -k 2 | tr -d ',' )   
+(read x; while read x s x x x c x; read x s2 x a d; do echo $s $s2 $a $c $d; done) < <( sed -n "s/^.*udev.*\(seq [0-9]* [qf].*$\)/\1/p" /var/log/messages | sort -n -k 2 | tr -d ',' )
 
 ./show_event_log 1 last > boot.events.log.`date +%A_%H:%M` 2> boot.events.list.`date +%A_%H:%M`

Modified: trunk/udev/udev
===================================================================
--- trunk/udev/udev	2005-12-20 07:23:06 UTC (rev 940)
+++ trunk/udev/udev	2005-12-20 08:11:03 UTC (rev 941)
@@ -26,7 +26,7 @@
 	list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)"
 	for i in $list; do
 	    case "$i" in
-		*/device/uevent)
+		*/device/uevent|*\**)
 		    # skip followed device symlinks
 		    continue
 		    ;;
@@ -73,12 +73,12 @@
 	# configure all devices
 	trigger_device_events
 
-	# until we know how to do better, we wait for all events to finish
-	loop=0
+	# until we know how to do better, just wait for _all_ events to finish
+	loop=300
 	while test -d /dev/.udev/queue; do
 	    sleep 0.1;
-	    test "$loop" -gt 300 && break
-	    loop=$(($loop + 1))
+	    test "$loop" -gt 0 || break
+	    loop=$(($loop - 1))
 	done
 
 	echo_ok

Modified: trunk/udev/udev.makechanges
===================================================================
--- trunk/udev/udev.makechanges	2005-12-20 07:23:06 UTC (rev 940)
+++ trunk/udev/udev.makechanges	2005-12-20 08:11:03 UTC (rev 941)
@@ -1,5 +1,6 @@
 Udev will need to be made with the following extras
 
+extras/firmware_helper
 extras/scsi_id
 extras/volume_id
 extras/ata_id




More information about the cross-lfs mailing list