+ # Write network configuration file
+ networkconf = file("%s/etc/sysconfig/network" % root, "w")
+ networkconf.write("NETWORKING=yes\nHOSTNAME=%s\n" % hostname)
+ if gateway is not None:
+ networkconf.write("GATEWAY=%s\n" % gateway)
+ networkconf.close()
+
+ # Process ifcfg-$dev changes / additions