diff options
author | Matthieu Crapet <Matthieu.Crapet@ingenico.com> | 2014-05-06 14:17:52 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-08 12:56:42 +0100 |
commit | c91739cd08ed5451a0927586a14db54c4c328ad7 (patch) | |
tree | 570328a2e49625aaa66eda7346660636f647a5c2 /meta/recipes-core | |
parent | 350c7c63c05a977158da91b4e06f84a6fb84a6ee (diff) | |
download | openembedded-core-c91739cd08ed5451a0927586a14db54c4c328ad7.tar.gz openembedded-core-c91739cd08ed5451a0927586a14db54c4c328ad7.tar.bz2 openembedded-core-c91739cd08ed5451a0927586a14db54c4c328ad7.zip |
initscripts: avoid pipe with sed
Small optimisation in /etc/init.d/populate-volatile.sh.
Replace:
cat <file> | sed -e xxx
By:
sed -e xxx <file>
Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core')
-rwxr-xr-x | meta/recipes-core/initscripts/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 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}" |