summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMing Liu <ming.liu@windriver.com>2013-09-10 15:53:24 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-10 23:00:46 +0100
commit71ab9ee58b0ba5e3f5cbf403d1b8fb79fc7f5ed1 (patch)
tree98609a23c4a246ca71ec89c283353a6fe582e0a8
parent637e0484ea4e7a39ac4d9c407c585201e6be1bc0 (diff)
downloadopenembedded-core-71ab9ee58b0ba5e3f5cbf403d1b8fb79fc7f5ed1.tar.gz
openembedded-core-71ab9ee58b0ba5e3f5cbf403d1b8fb79fc7f5ed1.tar.bz2
openembedded-core-71ab9ee58b0ba5e3f5cbf403d1b8fb79fc7f5ed1.zip
initscripts: filter out empty lines from volatiles in check_requirements()
So far the rules of check_requirements() is too strict to lead mismatch when empty lines exist in volatiles. Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh4
1 files changed, 2 insertions, 2 deletions
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 915b7d0b93..6ffe1f2171 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -107,7 +107,7 @@ check_requirements() {
TMP_COMBINED="${TMPROOT}/tmpcombined.$$"
cat ${ROOT_DIR}/etc/passwd | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}"
- cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 2 > "${TMP_INTERMED}"
+ cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 2 > "${TMP_INTERMED}"
cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
NR_DEFINED_USERS="`cat "${TMP_DEFINED}" | wc -l`"
NR_COMBINED_USERS="`cat "${TMP_COMBINED}" | wc -l`"
@@ -121,7 +121,7 @@ check_requirements() {
cat ${ROOT_DIR}/etc/group | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}"
- cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 3 > "${TMP_INTERMED}"
+ cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 3 > "${TMP_INTERMED}"
cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
NR_DEFINED_GROUPS="`cat "${TMP_DEFINED}" | wc -l`"