mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 00:32:12 +02: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}-."
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
# This configuration file lists filesystem objects that should get verified
|
||||
# during startup and be created if missing.
|
||||
#
|
||||
# Every line must either be a comment starting with #
|
||||
# or a definition of format:
|
||||
# Entries have the following format:
|
||||
# <type> <owner> <group> <mode> <path> <linksource>
|
||||
# where the items are separated by whitespace !
|
||||
#
|
||||
# The # character introduces a comment lasting until end of line.
|
||||
# Blank lines are ignored.
|
||||
#
|
||||
# <type> : d|f|l : (d)irectory|(f)ile|(l)ink
|
||||
#
|
||||
# A linking example:
|
||||
|
||||
Reference in New Issue
Block a user