]> git.pld-linux.org Git - packages/systemd.git/commitdiff
- check for kernel version
authorfreetz <freetz@pld-linux.org>
Fri, 21 Oct 2005 08:26:32 +0000 (08:26 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    start_udev -> 1.18

start_udev

index 250a73fd8e26242fc635d7fdaad51eb19c48f632..70a845937bdd5c10deff9a1306acacd918939142 100644 (file)
@@ -153,10 +153,28 @@ ide_scan() {
        return 0
 }
 
+supported_kernel() {
+    case "$(uname -r)" in
+    2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;;
+    2.6.1[01]|2.6.1[01][!0-9]*) return 1 ;;
+    esac
+    return 0
+}
+
+set_hotplug_handler() {
+    echo /sbin/udevsend > /proc/sys/kernel/hotplug
+}
+
 export ACTION=add
 prog=udev
 ret=0
 nls "Starting udev"
+                                                                                        
+if ! supported_kernel; then                                                              
+    echo "udev requires a kernel >= 2.6.12, 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 && {
@@ -195,7 +213,7 @@ ret=$(( $ret + $? ))
 
 ide_scan > "$udev_root/null" 2>&1
 
-echo /sbin/udevsend > /proc/sys/kernel/hotplug
+set_hotplug_handler
 
 /sbin/udevstart
 
This page took 0.451108 seconds and 4 git commands to generate.