i have a problem with udev

#!/bin/sh
#
### BEGIN INIT INFO
# Provides:          boot.udev
# Required-Start:
# Default-Start:     B
# Default-Stop:
# Description:       Start udevd to manage /dev and kernel device events.
### END INIT INFO

. /etc/rc.status

PATH="/sbin:/bin"
DAEMON=/sbin/udevd
udevd_args="--daemon"

case "$1" in
    start)
        checkproc $DAEMON
        if [ $? -eq 0 ]; then
                echo -n "udevd already running"
                rc_status -v
                rc_exit
        fi

        # disable uevent helper, udevd listens to netlink
        echo "" > /sys/kernel/uevent_helper

        # start udevd (needs to block until we are initialized)
        echo -n "Starting udevd "
        rm -rf /dev/.udev
        $DAEMON $udevd_args

        # cleanup stuff
        rm -rf /events/*

        # run static device configurations
        HWCFG_STUB=/etc/sysconfig/hardware/hwcfg
        for cfg in ${HWCFG_STUB}-static*; do
            if [ -f $cfg ]; then
                /sbin/hwup ${cfg#$HWCFG_STUB-} ${cfg#$HWCFG_STUB-static-} -o 
auto 
> /dev/null 2>&1
            fi
        done

        # trigger events for all devices
        /sbin/udevtrigger

        # wait for events to finish
        /sbin/udevsettle --timeout=180
        rc_status -v
        ;;
    stop)
        echo -n "Stopping udevd:"
        killproc $DAEMON
        rc_status -v
        ;;
    restart)
        echo -n "Restarting udevd:"
        killproc $DAEMON
        $DAEMON $udevd_args
        rc_status -v
        ;;
    status)
        echo -n "Checking for udevd:"
        checkproc /sbin/udevd
        rc_status -v
        ;;
    reload)
        echo -n "Reloading udev rules:"
        udevcontrol reload_rules
        cp --preserve=all --recursive --update /lib/udev/devices/* /dev
        rc_status -v
        ;;
    force-reload)
        echo -n "Updating all available device nodes in /dev: "
        udevcontrol reload_rules
        rm -rf /dev/.udev /dev/disk
        cp --preserve=all --recursive --update /lib/udev/devices/* /dev
        /sbin/udevtrigger
        rc_status -v
        ;;
    *)
        echo "Usage: $0 {start|stop|restart|status|reload|force-reload}"
        exit 1
        ;;
esac
rc_exit
-- 
_______________________________________________
Initng mailing list
[email protected]
http://jw.dyndns.org/mailman/listinfo/initng

Reply via email to