summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts
diff options
context:
space:
mode:
authorMatthieu Crapet <Matthieu.Crapet@ingenico.com>2014-05-06 14:17:52 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-08 13:00:33 +0100
commitc6a5e6cb520afa75c0f21fd7e11f758b17b87140 (patch)
treeeb020ec177bd8408bf715e980fad4027a68314fb /meta/recipes-core/initscripts
parent1150ef1879ac66776296c8f738bf4aa5cb735f54 (diff)
downloadpoky-c6a5e6cb520afa75c0f21fd7e11f758b17b87140.tar.gz
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> (From OE-Core rev: c91739cd08ed5451a0927586a14db54c4c328ad7) Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initscripts')
-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 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() {
106 TMP_DEFINED="${TMPROOT}/tmpdefined.$$" 106 TMP_DEFINED="${TMPROOT}/tmpdefined.$$"
107 TMP_COMBINED="${TMPROOT}/tmpcombined.$$" 107 TMP_COMBINED="${TMPROOT}/tmpcombined.$$"
108 108
109 cat ${ROOT_DIR}/etc/passwd | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}" 109 sed 's@\(^:\)*:.*@\1@' ${ROOT_DIR}/etc/passwd | sort | uniq > "${TMP_DEFINED}"
110 cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 2 > "${TMP_INTERMED}" 110 cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 2 > "${TMP_INTERMED}"
111 cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}" 111 cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
112 NR_DEFINED_USERS="`cat "${TMP_DEFINED}" | wc -l`" 112 NR_DEFINED_USERS="`cat "${TMP_DEFINED}" | wc -l`"
@@ -120,7 +120,7 @@ check_requirements() {
120 } 120 }
121 121
122 122
123 cat ${ROOT_DIR}/etc/group | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}" 123 sed 's@\(^:\)*:.*@\1@' ${ROOT_DIR}/etc/group | sort | uniq > "${TMP_DEFINED}"
124 cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 3 > "${TMP_INTERMED}" 124 cat ${CFGFILE} | grep -v "^#" | cut -s -d " " -f 3 > "${TMP_INTERMED}"
125 cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}" 125 cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
126 126