This is actually a part of udev update, not but is included here for completeness. Domen --- etc/rc.d/rc.udev | 77 ++++++++++++++++++++++++++++++----------------------- etc/udev/udev.conf | 19 +++++++++---- 2 files changed, 58 insertions(+), 38 deletions(-) Index: rootfs-slefika/etc/rc.d/rc.udev =================================================================== --- rootfs-slefika.orig/etc/rc.d/rc.udev +++ rootfs-slefika/etc/rc.d/rc.udev @@ -1,34 +1,45 @@ -#! /bin/bash -# Copyright (C) 2004 Greg Kroah-Hartman -# Released under the GPL v2 only. -. /etc/udev/udev.conf -run_udev() { -for i in /sys/block/*; do -export DEVPATH=${i#/sys} -/sbin/udev block -for j in $i/*; do -if [ -f $j/dev ]; then -export DEVPATH=${j#/sys} -/sbin/udev block -fi -done -done -for i in /sys/class/*; do -for j in $i/*; do -if [ -f $j/dev ]; then -export DEVPATH=${j#/sys} -CLASS=`echo ${i#/sys} | cut --delimiter='/' --fields=3-` -/sbin/udev $CLASS -fi -done -done -return 0 +#!/bin/sh +# +# This script assumes that /dev is already mounted on tmpfs or ramfs. + +udev_start() { + echo 'Starting udev to manage /dev.' + + # Disable hotplug helper; recent udevd listens on netlink + # socket. This requires Linux 2.6.15 or later. + [ -w /proc/sys/kernel/hotplug ] && printf /dev/null > /proc/sys/kernel/hotplug + + # Copy the static device nodes to /dev. + cp -a /lib/udev/devices/* /dev + + # Start udevd: + udevd --daemon + + # Initialize devices: + udevtrigger && udevsettle --timeout="$UDEV_SETTLE_TIMEOUT" } -if [ -d /sys/block -a -r /proc/sys/kernel/hotplug ]; then -echo "Initializing udev dynamic device directory." -mount -n -t ramfs none $udev_root -export ACTION=add -export UDEV_NO_SLEEP=1 -/sbin/udevstart -. /etc/udev/scripts/make_extra_nodes.sh -fi + +udev_stop() { + echo 'Stopping udevd.' + killall udevd +} + +udev_restart() { + udev_stop + echo 'waiting 5 seconds' + sleep 5 + udev_start +} + +udev_reload() { + udevcontrol reload_rules + cp -a /lib/udev/devices/* /dev +} + +case $1 in + start) udev_start ;; + stop) udev_stop ;; + restart) udev_restart ;; + reload) udev_reload ;; + *) echo "Usage: $0 {start|stop|restart|reload}"; exit 1 ;; +esac Index: rootfs-slefika/etc/udev/udev.conf =================================================================== --- rootfs-slefika.orig/etc/udev/udev.conf +++ rootfs-slefika/etc/udev/udev.conf @@ -1,8 +1,17 @@ +# udev.conf +# The main config file for udev +# +# This file can be used to override some of udev's default values for where it +# looks for files, and where it places device nodes. + +# udev_root - where in the filesystem to place the device nodes udev_root="/dev/" -udev_db="/dev/.udev.tdb" + +# udev_rules - The name and location of the udev rules dir udev_rules="/etc/udev/rules.d" -default_mode="0660" -default_owner="root" -default_group="root" -udev_log="no" + +# udev_log - The initial syslog(3) priority: "err", "info", "debug" or +# its numerical equivalent. For runtime debugging, the daemons +# internal state can be changed with: udevcontrol log_priority= +udev_log="err"