Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by mail.openembedded.org (Postfix) with ESMTP id C4EB2617B8 for ; Tue, 10 Sep 2013 07:53:41 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.14.5/8.14.3) with ESMTP id r8A7rhrH003611 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 10 Sep 2013 00:53:43 -0700 (PDT) Received: from pek-lpgbuild1.wrs.com (128.224.153.21) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.2.347.0; Tue, 10 Sep 2013 00:53:42 -0700 From: Ming Liu To: Date: Tue, 10 Sep 2013 15:53:24 +0800 Message-ID: <1378799604-22201-1-git-send-email-ming.liu@windriver.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Subject: [PATCH] initscripts: filter out empty lines from volatiles in check_requirements() X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Sep 2013 07:53:43 -0000 Content-Type: text/plain So far the rules of check_requirements() is too strict to lead mismatch when empty lines exist in volatiles. Signed-off-by: Ming Liu --- .../initscripts-1.0/populate-volatile.sh | 4 ++-- 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 915b7d0..6ffe1f2 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`" -- 1.7.1