diff options
author | Chris Lumens <clumens@redhat.com> | 2009-03-19 15:00:27 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-03-19 17:02:17 -0400 |
commit | bfc10b4c4432ac564379d1771bbbda64ac0400ab (patch) | |
tree | 3a67c4df9ccb03b20a9e8ca2e7c1737607c236e4 /bootloader.py | |
parent | 22ff5bd2d0e4f5b247c733c75ba466f9e99e8cad (diff) | |
download | anaconda-bfc10b4c4432ac564379d1771bbbda64ac0400ab.tar.gz anaconda-bfc10b4c4432ac564379d1771bbbda64ac0400ab.tar.xz anaconda-bfc10b4c4432ac564379d1771bbbda64ac0400ab.zip |
Fix writing the default= line in grub.conf (#490756).
This was caused by trying to compare an instance of an object with a string,
which of course is never going to work.
Diffstat (limited to 'bootloader.py')
-rw-r--r-- | bootloader.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bootloader.py b/bootloader.py index f9209528c..08e874ce3 100644 --- a/bootloader.py +++ b/bootloader.py @@ -136,17 +136,18 @@ def writeBootloader(anaconda): kernelList = [] otherList = [] - rootDev = getattr(anaconda.id.storage.fsset.rootDevice, "name", None) - defaultDev = anaconda.id.bootloader.images.getDefault() + # getDefault needs to return a device, but that's too invasive for now. + rootDev = anaconda.id.storage.fsset.rootDevice + defaultDev = anaconda.id.storage.devicetree.getDeviceByName(anaconda.id.bootloader.images.getDefault()) kernelLabel = None kernelLongLabel = None for (dev, (label, longlabel, type)) in anaconda.id.bootloader.images.getImages().items(): - if (dev == rootDev) or (rootDev is None and kernelLabel is None): + if (rootDev is None and kernelLabel is None) or (dev == rootDev.name): kernelLabel = label kernelLongLabel = longlabel - elif dev == defaultDev: + elif dev == defaultDev.name: otherList = [(label, longlabel, dev)] + otherList else: otherList.append((label, longlabel, dev)) @@ -175,7 +176,7 @@ def writeBootloader(anaconda): f.write("# UPDATEDEFAULT specifies if new-kernel-pkg should make\n" "# new kernels the default\n") # only update the default if we're setting the default to linux (#156678) - if rootDev == defaultDev: + if rootDev.name == defaultDev.name: f.write("UPDATEDEFAULT=yes\n") else: f.write("UPDATEDEFAULT=no\n") |