Re: [PATCH] Add leavebootorder option (pykickstart)

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

 



On Wed, 2012-06-13 at 15:44 -0500, Mark Hamzy wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=827116
> 
> The default on PowerPC machines is to change the boot order to boot into the
> newly installed drive.  There are install scenarios where this is not
> preferable.  So, I have added a new boot commandline and kickstart option
> called leavebootorder.
> 
> ---
>  pykickstart/commands/bootloader.py |   19 +++++++++++++++++++
>  pykickstart/handlers/control.py    |    2 +-
>  2 files changed, 20 insertions(+), 1 deletions(-)
> 
> diff --git a/pykickstart/commands/bootloader.py b/pykickstart/commands/bootloader.py
> index bb40a18..2268a68 100644
> --- a/pykickstart/commands/bootloader.py
> +++ b/pykickstart/commands/bootloader.py
> @@ -234,6 +234,25 @@ class F17_Bootloader(F15_Bootloader):
>          op.add_option("--boot-drive", dest="bootDrive", default="")
>          return op
>  
> +class F18_Bootloader(F17_Bootloader):
> +    def __init__(self, writePriority=10, *args, **kwargs):
> +        F17_Bootloader.__init__(self, writePriority, *args, **kwargs)
> +
> +        self.leavebootorder = kwargs.get("leavebootorder", False)
> +
> +    def _getArgsAsStr(self):
> +        ret = F17_Bootloader._getArgsAsStr(self)
> +
> +        if self.leavebootorder:
> +            ret += " --leavebootorder"
> +
> +        return ret
> +
> +    def _getParser(self):
> +        op = F17_Bootloader._getParser(self)
> +        op.add_option("--leavebootorder", action="store_true", default=False)
> +        return op
> +
>  class RHEL5_Bootloader(FC4_Bootloader):
>      removedKeywords = FC4_Bootloader.removedKeywords
>      removedAttrs = FC4_Bootloader.removedAttrs
> diff --git a/pykickstart/handlers/control.py b/pykickstart/handlers/control.py
> index 6fe7c10..4a7b41e 100644
> --- a/pykickstart/handlers/control.py
> +++ b/pykickstart/handlers/control.py
> @@ -890,7 +890,7 @@ commandMap = {
>          "authconfig": authconfig.FC3_Authconfig,
>          "autopart": autopart.F17_AutoPart,
>          "autostep": autostep.FC3_AutoStep,
> -        "bootloader": bootloader.F17_Bootloader,
> +        "bootloader": bootloader.F18_Bootloader,
>          "btrfs": btrfs.F17_BTRFS,
>          "cdrom": method.F14_Method,
>          "clearpart": clearpart.F17_ClearPart,
Add a test case, please.

-- 
Vratislav Podzimek

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

_______________________________________________
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