From 278fe3bc04b4a0d31ba080d7b43c72a6a09fb70a Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 13 Oct 2010 13:32:23 -0700 Subject: [PATCH] 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 --- 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 798590c3b7..816637fe4d 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 d6a858d973..fc33592442 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 dc81ec1c52..9c76184672 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 . } -- 2.39.5