template.awk fix processing of certain config file formats
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 20 Oct 2006 12:56:42 +0000 (12:56 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 20 Oct 2006 12:56:42 +0000 (12:56 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5249 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/default/lib/config/template.awk

index 9ce32b7..faae8b3 100644 (file)
@@ -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 ""
 }
This page took 0.030162 seconds and 4 git commands to generate.