]> git.pld-linux.org Git - packages/systemd.git/commitdiff
- small fixes auto/th/udev-086-0_1
authorfreetz <freetz@pld-linux.org>
Thu, 26 Jan 2006 18:49:02 +0000 (18:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    start_udev -> 1.33

start_udev

index b18a1f17d9592f875aada0b37e02ecfff86be29c..f14dde70a5448fb16393fbc5c16a90b38903086a 100644 (file)
@@ -28,7 +28,6 @@ udevd_timeout=8
 # don't use udev if sysfs is not mounted.
 [ -d $sysfs_dir/class ] || exit 1
 [ -r /proc/mounts ] || exit 1
-[ -x /sbin/udev ] || exit 1
 [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf
 
 . /etc/rc.d/init.d/functions
@@ -44,6 +43,7 @@ make_extra_nodes () {
            case "$type" in
                L) ln -s $arg1 $udev_root/$name ;;
                D) mkdir -p $udev_root/$name ;;
+               M) mknod -m 600 /dev/$name $arg1 ;;
                *) echo "links.conf: unparseable line ($type $name $arg1)" ;;
            esac
        done
@@ -60,16 +60,13 @@ kill_udevd() {
 set_hotplug_handler() {
     echo "" > /proc/sys/kernel/hotplug
 }
-                                                                                                                                                       return 0                                             
+
 export ACTION=add
 prog=udev
 ret=0
 show "Starting udev"
 busy
 
-if ! supported_kernel; then
-    fail
-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
@@ -98,14 +95,18 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && \$3 == \"tmpfs\" { exit 1 }" /proc/moun
 kill_udevd > "$udev_root/null" 2>&1
 
 if [ -f "/sys/class/tty/console/uevent" ]; then
+
        # Start udevd daemon
        udevd --daemon
+       ret=$(( $ret + $? ))
        
-        # Making extra nodes
-       make_extra_nodes
-       
-        # Setting default hotplug handler
+       # Setting default hotplug handler
        set_hotplug_handler
+       ret=$(( $ret + $? ))
+       
+       # Making extra nodes
+       make_extra_nodes
+       ret=$(( $ret + $? ))
        
        # retrigger all events
        mkdir -p /dev/.udev/queue
@@ -128,13 +129,16 @@ if [ -f "/sys/class/tty/console/uevent" ]; then
                    ;;
            esac
        done
-
+       
+       ret=$(( $ret + $? ))
+       
        # trigger the sorted events
        for i in $first $default $last; do
            echo "add" > "$i"
        done
 
-
+       ret=$(( $ret + $? ))
+       
        # wait for the events to finish
        loop=300
        while test -d /dev/.udev/queue; do
@@ -142,6 +146,8 @@ if [ -f "/sys/class/tty/console/uevent" ]; then
            test "$loop" -gt 0 || break
            loop=$(($loop - 1))
        done
+       
+       ret=$(( $ret + $? ))
 else
        echo "udev requires a kernel >= 2.6.15, not started."
        exit 0                                                
This page took 0.041312 seconds and 4 git commands to generate.