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. (From OE-Core rev: 71ab9ee58b0ba5e3f5cbf403d1b8fb79fc7f5ed1) Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
f7d1286fe8
commit
879ad0532c
|
@ -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`"
|
||||
|
|
Loading…
Reference in New Issue