Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Kernel (http://www.linux-archive.org/debian-kernel/)
-   -   clean up sparc boot loader so that it writes out and links into /etc correctly (http://www.linux-archive.org/debian-kernel/332670-clean-up-sparc-boot-loader-so-writes-out-links-into-etc-correctly.html)

Dennis Gilmore 02-26-2010 09:31 PM

clean up sparc boot loader so that it writes out and links into /etc correctly
 
---
booty/sparc.py | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/booty/sparc.py b/booty/sparc.py
index 22c4ab8..c6db493 100644
--- a/booty/sparc.py
+++ b/booty/sparc.py
@@ -1,7 +1,10 @@
+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,
@@ -35,7 +38,7 @@ class sparcBootloaderInfo(bootloaderInfo):
f.write("message=%s
" % (mf,))
f.write("timeout=%s
" % (self.timeout or 50))

- (name, partNum) = getDiskPart(bootDev, self.storage)
+ (name, partNum) = getDiskPart(bootDev.name, self.storage)
partno = partNum + 1
f.write("partition=%s
" % (partno,))

@@ -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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 07:22 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.