From c6a5e6cb520afa75c0f21fd7e11f758b17b87140 Mon Sep 17 00:00:00 2001 From: Matthieu Crapet Date: Tue, 6 May 2014 14:17:52 +0200 Subject: initscripts: avoid pipe with sed Small optimisation in /etc/init.d/populate-volatile.sh. Replace: cat | sed -e xxx By: sed -e xxx (From OE-Core rev: c91739cd08ed5451a0927586a14db54c4c328ad7) Signed-off-by: Matthieu Crapet Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta') 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 6ffe1f2171..e707b20049 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh @@ -106,7 +106,7 @@ check_requirements() { TMP_DEFINED="${TMPROOT}/tmpdefined.$$" TMP_COMBINED="${TMPROOT}/tmpcombined.$$" - cat ${ROOT_DIR}/etc/passwd | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}" + sed 's@\(^:\)*:.*@\1@' ${ROOT_DIR}/etc/passwd | sort | uniq > "${TMP_DEFINED}" 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`" @@ -120,7 +120,7 @@ check_requirements() { } - cat ${ROOT_DIR}/etc/group | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}" + sed 's@\(^:\)*:.*@\1@' ${ROOT_DIR}/etc/group | sort | uniq > "${TMP_DEFINED}" cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 3 > "${TMP_INTERMED}" cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}" -- cgit v1.2.3-54-g00ecf