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>
This commit is contained in:
parent
1150ef1879
commit
c6a5e6cb52
|
@ -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}"
|
||||
|
||||
|
|
Loading…
Reference in New Issue