[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 01/05] Add and use iscsi flag in anaconda code



And and use iscsi flag in anaconda code.

diff -uprN -X /home/patman/dontdiff anaconda-10.91.12/anaconda iscsi-anaconda-10.91.12/anaconda
--- anaconda-10.91.12/anaconda	2006-02-01 12:34:02.000000000 -0800
+++ iscsi-anaconda-10.91.12/anaconda	2006-02-02 12:53:06.000000000 -0800
@@ -428,7 +428,8 @@ try:
 	    'expert', 'serial', 'lowres', 'nofb', 'rescue', 'nomount',
 	    'autostep', 'resolution=', 'skipddc', 'noselinux', 'selinux',
 	    'vnc', 'vncconnect=', 'vnc=', 'cmdline', 'headless', 'usefbx',
-	    'virtpconsole=', 'loglevel=', 'syslog=', 'nodmraid','dmraid'])
+	    'virtpconsole=', 'loglevel=', 'syslog=', 'nodmraid','dmraid',
+	    'iscsi'])
 except TypeError, msg:
     sys.stderr.write("Error %s\n:" % msg)
     sys.exit(-1)
@@ -513,6 +514,8 @@ for n in args:
 	flags.expert = 1 
     elif (str == '--graphical'):
 	display_mode = 'g'
+    elif (str == '--iscsi'):
+	flags.iscsi = 1
     elif (str == '--keymap'):
 	keymap = arg
     elif (str == '--kickstart'):
diff -uprN -X /home/patman/dontdiff anaconda-10.91.12/flags.py iscsi-anaconda-10.91.12/flags.py
--- anaconda-10.91.12/flags.py	2005-12-15 08:23:57.000000000 -0800
+++ iscsi-anaconda-10.91.12/flags.py	2006-02-02 12:53:06.000000000 -0800
@@ -34,6 +34,7 @@ class Flags:
 	self.__dict__['flags']['test'] = 0
 	self.__dict__['flags']['rootpath'] = 0
 	self.__dict__['flags']['expert'] = 0
+	self.__dict__['flags']['iscsi'] = 0
 	self.__dict__['flags']['serial'] = 0
 	self.__dict__['flags']['setupFilesystems'] = 1
 	self.__dict__['flags']['autostep'] = 0
diff -uprN -X /home/patman/dontdiff anaconda-10.91.12/installclass.py iscsi-anaconda-10.91.12/installclass.py
--- anaconda-10.91.12/installclass.py	2006-01-25 18:25:16.000000000 -0800
+++ iscsi-anaconda-10.91.12/installclass.py	2006-02-02 12:53:06.000000000 -0800
@@ -27,6 +27,7 @@ from rhpl.translate import _, N_
 import logging
 log = logging.getLogger("anaconda")
 
+from flags import flags
 from constants import *
 
 class BaseInstallClass:
@@ -121,6 +122,7 @@ class BaseInstallClass:
                  "findrootparts",
 		 "betanag",
 		 "installtype",
+		 "iscsi",
 		 "zfcpconfig",
                  "partitionmethod",
                  "partitionobjinit",
@@ -189,6 +191,10 @@ class BaseInstallClass:
         if "upgrade" in cmdline:
             dispatch.skipStep("findrootparts", skip = 0)
 
+        # Ask for iscsi configuration only when specifically requested
+        if not flags.iscsi:
+             dispatch.skipStep("iscsi", skip = 1)
+		
         # if there's only one install class, it doesn't make much sense
         # to show it
         if len(availableClasses()) < 2:
diff -uprN -X /home/patman/dontdiff anaconda-10.91.12/instdata.py iscsi-anaconda-10.91.12/instdata.py
--- anaconda-10.91.12/instdata.py	2006-01-30 13:13:06.000000000 -0800
+++ iscsi-anaconda-10.91.12/instdata.py	2006-02-02 12:53:49.000000000 -0800
@@ -26,6 +26,7 @@ import fsset
 import bootloader
 import partitions
 import partedUtils
+import iscsi
 import zfcp
 import urllib
 import iutil
@@ -51,6 +52,8 @@ class InstallData:
 
 	self.instClass = None
 	self.network = network.Network()
+	if flags.iscsi:
+	    self.iscsi = iscsi.iscsi()
 	self.zfcp = zfcp.ZFCP()
 	self.firewall = firewall.Firewall()
         self.security = security.Security()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]