make-secnet-sites: Allow sites with no address
[secnet] / make-secnet-sites
index 547f572..9d0c6a6 100755 (executable)
@@ -267,12 +267,12 @@ class sitelevel(level):
         'networks':None,
         'peer':None,
         'pubkey':(lambda n,v:"key %s;\n"%v),
+        'address':None,
         'mobile':sp,
        })
        require_properties={
         'dh':"Diffie-Hellman group",
         'contact':"Site admin contact address",
-        'address':"Site external access address",
         'networks':"Networks claimed by the site",
         'hash':"hash function",
         'peer':"Gateway address of the site",
@@ -391,8 +391,10 @@ def pline(i,allow_include=False):
 
 def pfilepath(pathname,allow_include=False):
        f=open(pathname)
-       pfile(pathname,f.readlines(),allow_include=allow_include)
+       lines=f.readlines()
+       pfile(pathname,lines,allow_include=allow_include)
        f.close()
+       return lines
 
 def pfile(name,lines,allow_include=False):
        "Process a file"
@@ -465,7 +467,7 @@ else:
                if not ok:
                        print "caller not in group %s"%group
                        sys.exit(1)
-               pfilepath(header,allow_include=True)
+               headerinput=pfilepath(header,allow_include=True)
                userinput=sys.stdin.readlines()
                pfile("user input",userinput)
        else: