[PATCH] Fix heredoc usage in generated /etc/grub.d/01_users (#1044404).

David Shea dshea at redhat.com
Tue Feb 18 20:22:24 UTC 2014


On 02/18/2014 03:05 PM, David Cantrell wrote:
> ---
>   pyanaconda/bootloader.py |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
> index a7856d3..4e0169f 100644
> --- a/pyanaconda/bootloader.py
> +++ b/pyanaconda/bootloader.py
> @@ -1511,7 +1511,7 @@ class GRUB2(GRUB):
>           users_file = ROOT_PATH + "/etc/grub.d/01_users"
>           header = open(users_file, "w")
>           header.write("#!/bin/sh -e\n\n")
> -        header.write("cat << EOF\n")
> +        header.write("cat << \"EOF\"\n")
>           # XXX FIXME: document somewhere that the username is "root"
>           header.write("set superusers=\"root\"\n")
>           header.write("export superusers\n")

Looks fine (assuming self._encrypt_password() never returns 'EOF')


More information about the anaconda-patches mailing list