[PATCH 2/3] add rescue kernel entry to extlinux conf

Vratislav Podzimek vpodzime at redhat.com
Mon May 12 08:27:15 UTC 2014


On Tue, 2014-04-22 at 12:33 -0400, Gene Czarcinski wrote:
> This update adds an additional kernel definition to extlinux.conf
> which points to the rescue kernel installed by anaconda.
> ---
>  pyanaconda/bootloader.py | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
> index 6012d3a..f8d8220 100644
> --- a/pyanaconda/bootloader.py
> +++ b/pyanaconda/bootloader.py
> @@ -2224,6 +2224,27 @@ class EXTLINUX(BootLoader):
>                           "boot_prefix": self.boot_prefix})
>              config.write(stanza)
>  
> +        # create an entry with the rescue kernel
> +        machid_path = os.path.normpath(ROOT_PATH + "/etc/machine-id")
> +        machid_file = open(machid_path, "r")
> +        machid = machid_file.readline()
> +        machid_file.close()
This should be:
with open(machid_path, "r") as machid_file:
    machid = machid_file.readline()

Other than that I'm confused in the same way as Colin.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list