[PATCH] Ensure new kernel is default in zipl.conf on upgrade installs (#683891)

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

 



Rather than writing out the entry name as just 'linux', attach the
kernel version so there is some description for the user at boot time.
Keep the order the same as we have in previous releases, but ensure the
most recent kernel is the default boot selection.
---
 bootloader.py |   11 ++++-------
 booty/s390.py |    4 ++--
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/bootloader.py b/bootloader.py
index 5ef6729..8631f0b 100644
--- a/bootloader.py
+++ b/bootloader.py
@@ -184,19 +184,16 @@ def writeBootloader(anaconda):
         w.pop()
         return
 
-    plainLabelUsed = 0
     defkern = "kernel"
     for (version, arch, nick) in \
             anaconda.backend.kernelVersionList(anaconda.rootPath):
-	if plainLabelUsed:
+        if nick != 'base':
+            defkern = "kernel-%s" %(nick,)
             kernelList.append(("%s-%s" %(kernelLabel, nick),
                                "%s-%s" %(kernelLongLabel, nick),
                                version))
-	else:
-	    kernelList.append((kernelLabel, kernelLongLabel, version))
-            if nick != "base":
-                defkern = "kernel-%s" %(nick,)
-	    plainLabelUsed = 1
+        else:
+            kernelList.append((kernelLabel, kernelLongLabel, version))
 
     f = open(anaconda.rootPath + "/etc/sysconfig/kernel", "w+")
     f.write("# UPDATEDEFAULT specifies if new-kernel-pkg should make\n"
diff --git a/booty/s390.py b/booty/s390.py
index 40d7323..0101d96 100644
--- a/booty/s390.py
+++ b/booty/s390.py
@@ -131,7 +131,7 @@ class s390BootloaderInfo(bootloaderInfo):
         f.write('[defaultboot]\n')
         if self.timeout:
             f.write('timeout=%d\n' % self.timeout)
-        f.write('default=' + kernelList[0][0] + '\n')
+        f.write('default=' + kernelList[-1][0] + '-' + kernelList[-1][2] + '\n')
         f.write('target=%s\n' % (self.kernelLocation))
 
         cfPath = "/boot/"
@@ -140,7 +140,7 @@ class s390BootloaderInfo(bootloaderInfo):
             kernelFile = "%svmlinuz%s" % (cfPath, kernelTag)
 
             initrd = self.makeInitrd(kernelTag, instRoot)
-            f.write('[%s]\n' % (label))
+            f.write('[%s-%s]\n' % (label, version))
             f.write('\timage=%s\n' % (kernelFile))
             if initrd:
                 f.write('\tramdisk=%s%s\n' %(self.kernelLocation, initrd))
-- 
1.7.1

_______________________________________________
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