From: Felix Fietkau Date: Fri, 20 Oct 2006 12:56:42 +0000 (+0000) Subject: template.awk fix processing of certain config file formats X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=dbd8cee5e7fa98035f2b017f968b7f3090c36617;p=openwrt%2Fstaging%2Frmilecki.git template.awk fix processing of certain config file formats SVN-Revision: 5249 --- diff --git a/package/base-files/default/lib/config/template.awk b/package/base-files/default/lib/config/template.awk index 9ce32b74ffb..faae8b345c8 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 "" }