udev 141/151/154: Fix update-rc.d logic for udev-cache
authorTom Rini <tom_rini@mentor.com>
Wed, 13 Oct 2010 20:32:23 +0000 (13:32 -0700)
committerTom Rini <tom_rini@mentor.com>
Wed, 13 Oct 2010 20:35:13 +0000 (13:35 -0700)
The way that functions are evaluated means that while
we say append our update-rc.d addition for udev-cache
ends up at the top of the postinst script meaning that
$OPT is not set and this error will cause no udev rcN.d
symlinks to be created until during the first boot which
can be a problem.

Signed-off-by: Tom Rini <tom_rini@mentor.com>
recipes/udev/udev_141.bb
recipes/udev/udev_151.bb
recipes/udev/udev_154.bb

index 798590c..816637f 100644 (file)
@@ -7,7 +7,7 @@ DEFAULT_PREFERENCE = "-1"
 
 require udev.inc
 
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
 
 SRC_URI += "file://mount.blacklist \
            file://run.rules \
@@ -100,6 +100,11 @@ do_install_append_hipox() {
 
 # Create the cache after checkroot has run
 pkg_postinst_udev_append() {
+if test "x$D" != "x"; then
+       OPT="-r $D"
+else
+       OPT="-s"
+fi
 update-rc.d $OPT udev-cache start 12 S .
 
 if [ -d $D/lib/udev/rules.d ] ; then
index d6a858d..fc33592 100644 (file)
@@ -3,7 +3,7 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod
 the hotplug package and requires a kernel not older than 2.6.12."
 LICENSE = "GPLv2+"
 
-PR = "r17"
+PR = "r18"
 
 # Untested
 DEFAULT_PREFERENCE = "-1"
@@ -147,6 +147,11 @@ do_install_append_bug() {
 
 # Create the cache after checkroot has run
 pkg_postinst_udev_append() {
+       if test "x$D" != "x"; then
+               OPT="-r $D"
+       else
+               OPT="-s"
+       fi
        update-rc.d $OPT udev-cache start 12 S .
 }
 
index dc81ec1..9c76184 100644 (file)
@@ -3,7 +3,7 @@ DESCRIPTION = "udev is a daemon which dynamically creates and removes device nod
 the hotplug package and requires a kernel not older than 2.6.12."
 LICENSE = "GPLv2+"
 
-PR = "r4"
+PR = "r5"
 
 # Untested
 DEFAULT_PREFERENCE = "-1"
@@ -148,5 +148,10 @@ do_install_append_bug() {
 
 # Create the cache after checkroot has run
 pkg_postinst_udev_append() {
+       if test "x$D" != "x"; then
+               OPT="-r $D"
+       else
+               OPT="-s"
+       fi
        update-rc.d $OPT udev-cache start 12 S .
 }