diff options
author | Chris Lumens <clumens@redhat.com> | 2009-06-05 10:59:29 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-06-05 16:12:33 -0400 |
commit | 34ed3c31021d7139de8f0e84215a46769abdb992 (patch) | |
tree | 0eac7ad7090a6a7d506f8c5595603fd2bb780b29 /booty/ppc.py | |
parent | 5247763ce8b9d61aed0f9cec552d69bff7829a95 (diff) | |
download | anaconda-34ed3c31021d7139de8f0e84215a46769abdb992.tar.gz anaconda-34ed3c31021d7139de8f0e84215a46769abdb992.tar.xz anaconda-34ed3c31021d7139de8f0e84215a46769abdb992.zip |
Catch errors from bootloader installation and tell the user (#502210).
Diffstat (limited to 'booty/ppc.py')
-rw-r--r-- | booty/ppc.py | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/booty/ppc.py b/booty/ppc.py index 4633f079d..8cd427532 100644 --- a/booty/ppc.py +++ b/booty/ppc.py @@ -141,34 +141,40 @@ class ppcBootloaderInfo(bootloaderInfo): isys.sync() ybinargs = [ yabootProg, "-f", "-C", cf ] - + if not flags.test: - iutil.execWithRedirect(ybinargs[0], - ybinargs[1:], - stdout = "/dev/tty5", - stderr = "/dev/tty5", - root = instRoot) + rc = iutil.execWithRedirect(ybinargs[0], + ybinargs[1:], + stdout = "/dev/tty5", + stderr = "/dev/tty5", + root = instRoot) + if rc: + return rc if (not os.access(instRoot + "/etc/yaboot.conf", os.R_OK) and os.access(instRoot + "/boot/etc/yaboot.conf", os.R_OK)): os.symlink("../boot/etc/yaboot.conf", instRoot + "/etc/yaboot.conf") - - return "" + + return 0 def setPassword(self, val, isCrypted = 1): # yaboot just handles the password and doesn't care if its crypted # or not self.password = val - + def write(self, instRoot, bl, kernelList, chainList, defaultDev, justConfig): if len(kernelList) >= 1: - out = self.writeYaboot(instRoot, bl, kernelList, - chainList, defaultDev, justConfig) + rc = self.writeYaboot(instRoot, bl, kernelList, + chainList, defaultDev, justConfig) + if rc: + return rc else: raise BootyNoKernelWarning + return 0 + def __init__(self, storage): bootloaderInfo.__init__(self, storage) self.useYabootVal = 1 |