SOURCES (AC-branch): start_udev - removed obsoleted features
freetz
freetz at pld-linux.org
Tue Jul 4 18:31:16 CEST 2006
Author: freetz Date: Tue Jul 4 16:31:16 2006 GMT
Module: SOURCES Tag: AC-branch
---- Log message:
- removed obsoleted features
---- Files affected:
SOURCES:
start_udev (1.8.2.2 -> 1.8.2.3)
---- Diffs:
================================================================
Index: SOURCES/start_udev
diff -u SOURCES/start_udev:1.8.2.2 SOURCES/start_udev:1.8.2.3
--- SOURCES/start_udev:1.8.2.2 Tue Feb 14 00:05:21 2006
+++ SOURCES/start_udev Tue Jul 4 18:31:10 2006
@@ -60,98 +60,8 @@
fi
}
-# we cannot use /usr/bin/find here
-find_d () {
- where=$1
- what=$2
- found=""
- for f in $where/*; do
- if [ -d "$f" -a ! -L "$f" ]; then
- if [ "$f" != "${f%%$what}" ];then
- # make sure we are at the path end
- # we have no dirname and basename
- rest="${f#*$what}"
- [ "${rest##*/}" = "$rest" ] && found="$found $f"
- fi
- found="$found $(find_d $f $what)"
- fi
- done
- echo "$found"
-}
-
-# we cannot use /usr/bin/find here
-find_f () {
- where=$1
- what=$2
- found=""
- for f in $where/*; do
- if [ -d "$f" -a ! -L "$f" ]; then
- found="$found $(find_f $f $what)"
- elif [ -e "$f" ]; then
- [ "$where/" = "${f%$what}" ] && found="$found $f"
- fi
- done
- [ -n "$found" ] && echo "$found"
-}
-
-# call hotplug with the scsi devices
-scsi_replay () {
- HOTPLUG="/sbin/udevsend"
-
- scsi_hosts=$(find_d /sys/devices host\*)
- SEQNUM=1
-
- for host in $scsi_hosts; do
- [ -d $host ] || continue
- devs=$(find_f $host type)
- for dev in $devs;do
- [ -f $dev ] || continue
- DEVPATH=${dev%/type}
- DEVPATH=${DEVPATH#/sys}
- /bin/env -i DEVPATH="$DEVPATH" SUBSYSTEM=scsi_device ACTION=add $HOTPLUG scsi_device
- /bin/env -i DEVPATH="$DEVPATH" ACTION=add SUBSYSTEM=scsi $HOTPLUG scsi
- done
- done
- return 0
-}
-
-ide_scan() {
- if [ ! -d /proc/ide ]; then
- return 1
- fi
- for i in /proc/ide/*/media; do
- read media < "$i"
- case "$media" in
- disk)
- module=ide-disk
- ;;
- cdrom)
- module=ide-cd
- ;;
- tape)
- module=ide-tape
- ;;
- floppy)
- module=ide-floppy
- ;;
- *)
- module=ide-generic
- ;;
- esac
- /sbin/modprobe $module
- done
- return 0
-}
-
-supported_kernel() {
- case "$(uname -r)" in
- 2.[012345].*) return 1 ;;
- esac
- return 0
-}
-
set_hotplug_handler() {
- echo /sbin/udevsend > /proc/sys/kernel/hotplug
+ echo "" > /proc/sys/kernel/hotplug
}
export ACTION=add
@@ -160,12 +70,6 @@
show "Starting udev"
busy
-if ! supported_kernel; then
- fail
- echo "udev requires a kernel >= 2.6.x, not started."
- exit 0
-fi
-
# mount the tmpfs on ${udev_root%/}, if not already done
LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/mounts && {
if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then
@@ -194,35 +98,31 @@
kill_udevd > "$udev_root/null" 2>&1
-scsi_replay > "$udev_root/null" 2>&1
-
-ret=$(( $ret + $? ))
-
-ide_scan > "$udev_root/null" 2>&1
-
# Starting the hotplug events dispatcher
-/sbin/udevd --daemon
+ /sbin/udevd --daemon
+ ret=$(( $ret + $? ))
# Making extra nodes
-make_extra_nodes
+ make_extra_nodes
+ ret=$(( $ret + $? ))
# Setting default hotplug handler
-set_hotplug_handler
-
+ set_hotplug_handler
+ ret=$(( $ret + $? ))
+
# Synthesizing the initial hotplug events
-/sbin/${UDEV_STARTER}
+ /sbin/${UDEV_STARTER}
+ ret=$(( $ret + $? ))
# wait for /dev to be fully populated
-while [ -d /dev/.udev/queue/ ]; do
- sleep 0.2
- udevd_timeout=$(($udevd_timeout - 1))
- if [ $udevd_timeout -eq 0 ]; then
- break
- fi
-done
-
-# Start workaround for broken Linux input subsystem
-/lib/udev/udev_input_coldplug start
+ while [ -d /dev/.udev/queue/ ]; do
+ sleep 0.2
+ udevd_timeout=$(($udevd_timeout - 1))
+ if [ $udevd_timeout -eq 0 ]; then
+ break
+ fi
+ done
+ ret=$(( $ret + $? ))
ret=$(( $ret + $? ))
[ $ret -eq 0 ] && ok || fail
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/start_udev?r1=1.8.2.2&r2=1.8.2.3&f=u
More information about the pld-cvs-commit
mailing list