def _interfaces_config(interfaces):
 if (interfaces is None):
  interfaces = DEFAULT_INTERFACES
 lines = [INTERFACES_HEADER]
 for entry in interfaces:
  entry.setdefault('zone', 'net')
  entry.setdefault('broadcast', 'detect')
  entry.setdefault('options', '')
  lines.append((INTERFACES_FORMAT % entry))
 file('/etc/shorewall/interfaces', contents=''.join(lines), use_sudo=True)

def _interfaces_config ( interfaces ) : if ( interfaces is None ) : interfaces = DEFAULT_INTERFACES lines = [ INTERFACES_HEADER ] for entry in interfaces : entry . setdefault ( 'zone' , 'net' ) entry . setdefault ( 'broadcast' , 'detect' ) entry . setdefault ( 'options' , '' ) lines . append ( ( INTERFACES_FORMAT % entry ) ) file ( '/etc/shorewall/interfaces' , contents = '' . join ( lines ) , use_sudo = True )
interfaces configuration .