diff options
author | Mans Rullgard <mans@mansr.com> | 2016-12-01 12:30:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-13 22:55:19 +0000 |
commit | 438d1230511f0b183e82df3b9d410f0cabcb59d0 (patch) | |
tree | 1cde5dd3d4eff4c515cb377b80ca701eee2061fa /meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh | |
parent | 494012830f049214adf7aaca10f46caed0c64409 (diff) | |
download | poky-438d1230511f0b183e82df3b9d410f0cabcb59d0.tar.gz |
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>
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh')
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh | 6 |
1 files changed, 3 insertions, 3 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 ce4622a5e5..91514bac86 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh | |||
@@ -150,9 +150,9 @@ apply_cfgfile() { | |||
150 | return 1 | 150 | return 1 |
151 | } | 151 | } |
152 | 152 | ||
153 | cat ${CFGFILE} | grep -v "^#" | \ | 153 | cat ${CFGFILE} | sed 's/#.*//' | \ |
154 | while read LINE; do | 154 | while read TTYPE TUSER TGROUP TMODE TNAME TLTARGET; do |
155 | eval `echo "$LINE" | sed -n "s/\(.*\)\ \(.*\) \(.*\)\ \(.*\)\ \(.*\)\ \(.*\)/TTYPE=\1 ; TUSER=\2; TGROUP=\3; TMODE=\4; TNAME=\5 TLTARGET=\6/p"` | 155 | test -z "${TLTARGET}" && continue |
156 | TNAME=${ROOT_DIR}${TNAME} | 156 | TNAME=${ROOT_DIR}${TNAME} |
157 | [ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-." | 157 | [ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-." |
158 | 158 | ||