This is a quick hack (the loader really needs modifying to allow the
flag to be put on the boot command line) at adding a --arch flag. Is
this sort of what you were suggesting, Erik?
--
/* Bill Crawford, Unix Systems Developer, Ebone (formerly GTS Netcom) */
#include <stddiscl>
const char *addresses[] = {
"bill@xxxxxxxxxxxxxxxxxxxx", "Bill.Crawford@xxxxxxxxx", // work
"billc@xxxxxxxxxxxxxx", "bill@xxxxxxxxx" // home
};
diff -ruN anaconda-7.2.90/anaconda anaconda-7.2.90-arch/anaconda
--- anaconda-7.2.90/anaconda Fri Feb 1 02:37:11 2002
+++ anaconda-7.2.90-arch/anaconda Fri Feb 8 13:30:19 2002
@@ -87,13 +87,13 @@
theargs = sys.argv[1:]
try:
- (args, extra) = isys.getopt(theargs, 'GTRxtdr:fm:',
+ (args, extra) = isys.getopt(theargs, 'GTRxtdr:fm:a:',
[ 'text', 'reconfig', 'xmode', 'test', 'debug', 'nofallback',
'method=', 'rootpath=', 'pcic=', "overhead=",
'testpath=', 'mountfs', 'traceonly', 'kickstart=',
'lang=', 'keymap=', 'module=', 'class=',
'expert', 'serial', 'lowres', 'nofb', 'rescue', 'nomount',
- 'autostep'])
+ 'autostep', 'arch='])
except TypeError, msg:
sys.stderr.write("Error %s\n:" % msg)
sys.exit(-1)
@@ -156,6 +156,8 @@
if (str == '--class'):
customClass = arg
+ elif (str == '-a' or str == '--arch'):
+ iutil.setArch (arg)
elif (str == '-d' or str == '--debug'):
debug = 1
elif (str == '--expert'):
diff -ruN anaconda-7.2.90/comps.py anaconda-7.2.90-arch/comps.py
--- anaconda-7.2.90/comps.py Fri Feb 1 14:18:16 2002
+++ anaconda-7.2.90-arch/comps.py Fri Feb 8 13:24:49 2002
@@ -785,7 +785,7 @@
# if arch == "sparc" and os.uname ()[4] == "sparc64":
# arch2 = "sparc64"
#
- arch2 = os.uname ()[4]
+ arch2 = iutil.getKernelArch ()
if not arch2 in self.archList:
self.archList.append (arch2)
else:
diff -ruN anaconda-7.2.90/iutil.py anaconda-7.2.90-arch/iutil.py
--- anaconda-7.2.90/iutil.py Fri Feb 1 21:50:25 2002
+++ anaconda-7.2.90-arch/iutil.py Fri Feb 8 13:23:45 2002
@@ -17,6 +17,8 @@
import os.path
from log import log
+architecture = None
+kernelArchitecture = None
memoryOverhead = 0
def setMemoryOverhead(amount):
@@ -24,8 +26,12 @@
memoryOverhead = amount
-def getArch ():
- arch = os.uname ()[4]
+def setArch (arch):
+ global architecture
+ global kernelArchitecture
+
+ kernelArchitecture = arch
+
if (len (arch) == 4 and arch[0] == 'i' and
arch[2:4] == "86"):
arch = "i386"
@@ -36,7 +42,27 @@
if arch == "s390x":
arch = "s390"
- return arch
+ architecture = arch
+
+def findArch ():
+ arch = os.uname ()[4]
+ setArch (arch)
+
+def getArch ():
+ global architecture
+
+ if not architecture:
+ findArch ()
+
+ return architecture
+
+def getKernelArch ():
+ global kernelArchitecture
+
+ if not kernelArchitecture:
+ findArch ()
+
+ return kernelArchitecture
def getfd(filespec, readOnly = 0):
if type(filespec) == types.IntType: