[CONSOLIDATED,PULL,01/28] initscripts: don't bg mk_dirs in populate-volatile

Submitted by Saul Wold on July 25, 2012, 7:18 a.m.

Details

Message ID 138c3c26830e48a56ca7cb3e5feca324d13ec89c.1343200454.git.sgw@linux.intel.com
State New
Headers show

Commit Message

Saul Wold July 25, 2012, 7:18 a.m.
From: Christopher Larson <chris_larson@mentor.com>

If a directory needs to be created to create something else in volatiles,
there's no guarantees on ordering due to the backgrounding. We can't guarantee
with certainty that the create directory commands are complete before the
later ones run. This ensures that we wait for directory creations to complete
before we proceed.

Chris Hallinan hit an actual failure due to this back in March of last year.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../initscripts-1.0/populate-volatile.sh           |    4 ++--
 meta/recipes-core/initscripts/initscripts_1.0.bb   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index 4a99aff..d2175d7 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -42,7 +42,7 @@  mk_dir() {
 	[ -e "$1" ] && {
 	  [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
 	} || {
-	  eval $EXEC &
+	  eval $EXEC
 	}
 }
 
@@ -153,7 +153,7 @@  apply_cfgfile() {
             create_file "${TNAME}" &
 	    ;;
       "d")  [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
-            mk_dir "${TNAME}" &
+            mk_dir "${TNAME}"
 	    # Add check to see if there's an entry in fstab to mount.
 	    ;;
       *)    [ "${VERBOSE}" != "no" ] && echo "Invalid type -${TTYPE}-."
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 1d80c55..b741b61 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -3,7 +3,7 @@  DESCRIPTION = "Initscripts provide the basic system startup initialization scrip
 SECTION = "base"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r135"
+PR = "r136"
 
 INHIBIT_DEFAULT_DEPS = "1"