mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
initscripts: populate-volatile: improve config file parsing
This improves the config file parsing to permit blank lines and comments following an entry or preceeded by whitespace. (From OE-Core rev: 415eaacb83b1c6df5210fb423e3e96e530b1dc42) Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
494012830f
commit
438d123051
@@ -150,9 +150,9 @@ apply_cfgfile() {
|
||||
return 1
|
||||
}
|
||||
|
||||
cat ${CFGFILE} | grep -v "^#" | \
|
||||
while read LINE; do
|
||||
eval `echo "$LINE" | sed -n "s/\(.*\)\ \(.*\) \(.*\)\ \(.*\)\ \(.*\)\ \(.*\)/TTYPE=\1 ; TUSER=\2; TGROUP=\3; TMODE=\4; TNAME=\5 TLTARGET=\6/p"`
|
||||
cat ${CFGFILE} | sed 's/#.*//' | \
|
||||
while read TTYPE TUSER TGROUP TMODE TNAME TLTARGET; do
|
||||
test -z "${TLTARGET}" && continue
|
||||
TNAME=${ROOT_DIR}${TNAME}
|
||||
[ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user