Browse code

config: get_meta_section() misunderstands the beginning of metasection

For example, the line, "if [[ -n $no_proxy ]]; then" is misparsed
as the beginning of metasection because get_meta_section() misses
escaping of "|" unlike get_meta_section_files().
This patch adds necessary escape as "|" -> "\|".

Change-Id: Ic14b2ac167037c4f5db89492f0e8a4c5b13c7b6d
Closes-Bug: #1262960

Isaku Yamahata authored on 2013/12/20 11:55:08
Showing 1 changed files
... ...
@@ -35,7 +35,7 @@ function get_meta_section() {
35 35
 
36 36
     $CONFIG_AWK_CMD -v matchgroup=$matchgroup -v configfile=$configfile '
37 37
         BEGIN { group = "" }
38
-        /^\[\[.+|.*\]\]/ {
38
+        /^\[\[.+\|.*\]\]/ {
39 39
             if (group == "") {
40 40
                 gsub("[][]", "", $1);
41 41
                 split($1, a, "|");