diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-10-20 12:56:42 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-10-20 12:56:42 +0000 |
commit | c5a86e2fbb0372968a597a395ea90cc26f8a1fcf (patch) | |
tree | 14b1bc861aaa934d1c4b57893401efdb487a6e3f | |
parent | 2646b412a170cf6e161d47efb1c9feaa6b4966de (diff) |
template.awk fix processing of certain config file formats
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5249 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/base-files/default/lib/config/template.awk | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/package/base-files/default/lib/config/template.awk b/package/base-files/default/lib/config/template.awk index 9ce32b74f..faae8b345 100644 --- a/package/base-files/default/lib/config/template.awk +++ b/package/base-files/default/lib/config/template.awk @@ -27,11 +27,11 @@ $1 == "@else" { else noprint = 1 } -($1 !~ /^@[a-zA-Z]/) && (noprint != 1) { +($1 !~ /^@[a-zA-Z0-9_]/) && (noprint != 1) { n=split(line "@@", a, /@@/) for (i=1; i<=n; i++) { - if ((i % 2) == 1) printf a[i] - else printf v[a[i]] + if ((i % 2) == 1) printf "%s" a[i] + else printf "%s" v[a[i]] } print "" } |