Index: tools/gformat.py
===================================================================
--- tools/gformat.py	(revision 10436)
+++ tools/gformat.py	(revision 10455)
@@ -364,5 +364,5 @@
   for iface_key in datadump['autogen_iface_keys']:
     if not datadump[iface_key].has_key('comment'):
-      datadump[iface_key]['comment'] = none
+      datadump[iface_key]['comment'] = None
     output += "## %(interface)s - %(desc)s - %(comment)s\n" % datadump[iface_key]
 
@@ -411,5 +411,5 @@
   for iface_key in datadump['autogen_iface_keys']:
     if not datadump[iface_key].has_key('comment'):
-      datadump[iface_key]['comment'] = none
+      datadump[iface_key]['comment'] = None
     output += "## %(interface)s - %(desc)s - %(comment)s\n" % datadump[iface_key]
 
@@ -433,5 +433,8 @@
 def generate_rc_conf_local(datadump):
   """ Generate configuration file '/etc/rc.conf.local' """
-  datadump['autogen_ileiden_enable'] = 'yes' if datadump['ileiden'] else 'no'
+  if not datadump.has_key('ileiden'):
+    datadump['autogen_ileiden_enable'] = False
+  else:
+    datadump['autogen_ileiden_enable'] = datadump['ileiden']
 
   ileiden_proxies = []
@@ -479,5 +482,5 @@
 pf_enable="yes"
 pf_rules="/etc/pf.conf"
-{% if autogen_ileiden_enable == "yes" -%}
+{% if autogen_ileiden_enable -%}
 pf_flags="-D ext_if={{ externalif }} -D int_if={{ internalif }} -D publicnat={80,443}"
 lvrouted_enable="{{ autogen_ileiden_enable }}"
@@ -1138,5 +1141,20 @@
         datadumps[datadump['autogen_realname']] = datadump
 
+
       for host,datadump in datadumps.iteritems():
+        # Convert all yes and no to boolean values
+        def fix_boolean(dump):
+          for key in dump.keys():
+            if type(dump[key]) == dict:
+              dump[key] = fix_boolean(dump[key])
+            elif str(dump[key]).lower() == "yes":
+              dump[key] = True
+            elif str(dump[key]).lower() == "no":
+              # Compass richting no (Noord Oost) is valid input
+              if key != "compass":
+                dump[key] = False
+          return dump
+        datadump = fix_boolean(datadump)
+
         if datadump['rdnap_x'] and datadump['rdnap_y']:
           datadump['latitude'], datadump['longitude'] = rdnap.rd2etrs(datadump['rdnap_x'], datadump['rdnap_y'])
