--- /usr/lib/python2.4/site-packages/koan/app.py	2007-11-29 14:16:24.000000000 -0800
+++ /tmp/app.py	2008-04-24 12:37:18.838783106 -0700
@@ -158,6 +158,11 @@
                  dest="no_gfx",
                  help="disable Xen graphics (xenpv,xenfv)")
 
+    p.add_option( "--ip", dest="ip" )
+    p.add_option( "--netmask", dest="netmask" )
+    p.add_option( "--hostname", dest="hostname" )
+    p.add_option( "--gateway", dest="gateway" )
+
     (options, args) = p.parse_args()
 
     if not os.getuid() == 0:
@@ -180,6 +185,15 @@
         k.virt_type         = options.virt_type
         k.no_gfx            = options.no_gfx
 
+        netconf = {
+            'hostname':   options.hostname,
+            'ip':         options.ip,
+            'netmask':    options.netmask,
+            'gateway':    options.gateway
+        }
+
+	k.netconf = netconf
+
         if options.virt_name is not None:
             k.virt_name          = options.virt_name
         if options.port is not None:
@@ -889,6 +903,7 @@
         # override anything set in the 'if self.is_replace' block above.
         ksconf = self.get_netconfig_from_kickstart(kickstart)
         if ksconf is not None: netconf.update( ksconf )
+        if self.netconf is not None: netconf.update( self.netconf )
  
         if netconf['ip'] is not None:
             kargs = kargs + " ip=%s" % netconf['ip']
