[oe-commits] Tom Rini : udev 141/151/154: Fix update-rc.d logic for udev-cache

git version control git at git.openembedded.org
Wed Oct 13 20:37:51 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 278fe3bc04b4a0d31ba080d7b43c72a6a09fb70a
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=278fe3bc04b4a0d31ba080d7b43c72a6a09fb70a

Author: Tom Rini <tom_rini at mentor.com>
Date:   Wed Oct 13 13:32:23 2010 -0700

udev 141/151/154: Fix update-rc.d logic for udev-cache

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 at mentor.com>

---

 recipes/udev/udev_141.bb |    7 ++++++-
 recipes/udev/udev_151.bb |    7 ++++++-
 recipes/udev/udev_154.bb |    7 ++++++-
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/recipes/udev/udev_141.bb b/recipes/udev/udev_141.bb
index 798590c..816637f 100644
--- a/recipes/udev/udev_141.bb
+++ b/recipes/udev/udev_141.bb
@@ -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
diff --git a/recipes/udev/udev_151.bb b/recipes/udev/udev_151.bb
index d6a858d..fc33592 100644
--- a/recipes/udev/udev_151.bb
+++ b/recipes/udev/udev_151.bb
@@ -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 .
 }
 
diff --git a/recipes/udev/udev_154.bb b/recipes/udev/udev_154.bb
index dc81ec1..9c76184 100644
--- a/recipes/udev/udev_154.bb
+++ b/recipes/udev/udev_154.bb
@@ -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 .
 }





More information about the Openembedded-commits mailing list