[PATCH 8/9] clean up sparc boot loader so that it writes out and links into /etc correctly

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

 



---
 booty/sparc.py |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/booty/sparc.py b/booty/sparc.py
index 22c4ab8..f6dd7be 100644
--- a/booty/sparc.py
+++ b/booty/sparc.py
@@ -1,14 +1,17 @@
+import string
 import os
 
 from booty import BootyNoKernelWarning
+from util import getDiskPart
 from bootloaderInfo import *
+import iutil
 
 class sparcBootloaderInfo(bootloaderInfo):
     def writeSilo(self, instRoot, bl, kernelList,
                 chainList, defaultDev, justConfigFile):
 
         try:
-            bootDev = self.storage.mountpoints["/boot"]
+            bootDev = self.storage.mountpoints["/boot"].name
 
             mf = '/silo.message'
             cf = "/boot/silo.conf"
@@ -17,7 +20,7 @@ class sparcBootloaderInfo(bootloaderInfo):
             if not os.path.isdir(instRoot + "/boot"):
                 os.mkdir(instRoot + "/boot")
         except KeyError:
-            bootDev = self.storage.rootDevice
+            bootDev = self.storage.rootDevice.name
 
             cf = "/etc/silo.conf"
             mfdir = '/etc'
@@ -31,7 +34,7 @@ class sparcBootloaderInfo(bootloaderInfo):
         f = open(instRoot + cf, "w+")
         f.write("# silo.conf generated by anaconda\n\n")
 
-        f.write("#boot=%s\n" % (bootDev.path,))
+        f.write("#boot=%s\n" % (bootDev,))
         f.write("message=%s\n" % (mf,))
         f.write("timeout=%s\n" % (self.timeout or 50))
 
@@ -61,7 +64,7 @@ class sparcBootloaderInfo(bootloaderInfo):
                 f.write("\tinitrd=%s/%s\n" % (cfPath, initrd))
 
             append = "%s" % (self.args.get(),)
-
+            
             realroot = rootDev.fstabSpec
             if rootIsDevice(realroot):
                 f.write("\troot=%s\n" % (realroot,))
@@ -86,9 +89,7 @@ class sparcBootloaderInfo(bootloaderInfo):
 
         backup = "%s/backup.b" % (cfPath,)
         sbinargs = ["/sbin/silo", "-f", "-C", cf, "-S", backup]
-        # TODO!!!  FIXME!!!  XXX!!!
-        # butil is not defined!!!  - assume this is in rhpl now?
-        if butil.getSparcMachine() == "sun4u":
+        if (iutil.getSparcMachine() == "sun4u" or iutil.getSparcMachine() == "sun4v"):
             sbinargs += ["-u"]
         else:
             sbinargs += ["-U"]
@@ -103,8 +104,8 @@ class sparcBootloaderInfo(bootloaderInfo):
                 return rc
 
         if (not os.access(instRoot + "/etc/silo.conf", os.R_OK) and
-            os.access(instRoot + "/boot/etc/silo.conf", os.R_OK)):
-            os.symlink("../boot/etc/silo.conf",
+            os.access(instRoot + "/boot/silo.conf", os.R_OK)):
+            os.symlink("../boot/silo.conf",
                        instRoot + "/etc/silo.conf")
 
         return 0
-- 
1.7.0

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux