[rhel7/master] Skip tui askvnc reboot for dirinstall (#1164254)

Vratislav Podzimek vpodzime at redhat.com
Wed Nov 19 19:11:23 UTC 2014


On Wed, 2014-11-19 at 10:11 -0800, Brian C. Lane wrote:
> When running with --dirinstall, or image or live we don't want to reboot
> the system when quitting tui mode. Normally this is handled by the
> exitHandler, but askvnc is too early for that to work.
> 
> Resolves: rhbz#1164254
> ---
>  pyanaconda/ui/tui/spokes/askvnc.py | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/pyanaconda/ui/tui/spokes/askvnc.py b/pyanaconda/ui/tui/spokes/askvnc.py
> index 52548f4..af1c9a5 100644
> --- a/pyanaconda/ui/tui/spokes/askvnc.py
> +++ b/pyanaconda/ui/tui/spokes/askvnc.py
> @@ -22,8 +22,10 @@
>  from pyanaconda.ui.tui.spokes import NormalTUISpoke
>  from pyanaconda.ui.tui.simpleline import TextWidget, ColumnWidget
>  from pyanaconda.ui.tui.tuiobject import YesNoDialog
> -from pyanaconda.constants import USEVNC, USETEXT
> +from pyanaconda import iutil
> +from pyanaconda.constants import USEVNC, USETEXT, IPMI_ABORTED
>  from pyanaconda.i18n import N_, _
> +from pyanaconda.flags import can_touch_runtime_system
>  import getpass, subprocess
>  
>  class AskVNCSpoke(NormalTUISpoke):
> @@ -88,7 +90,11 @@ class AskVNCSpoke(NormalTUISpoke):
>              d = YesNoDialog(self.app, _(self.app.quit_message))
>              self.app.switch_screen_modal(d)
>              if d.answer:
> -                subprocess.Popen(["systemctl", "--no-wall", "reboot"])
> +                iutil.ipmi_report(IPMI_ABORTED)
> +                if can_touch_runtime_system("Quit and Reboot"):
> +                    subprocess.Popen(["systemctl", "--no-wall", "reboot"])
> +                else:
> +                    exit(1)
>          else:
>              return key
ACK.

-- 
Vratislav Podzimek

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



More information about the anaconda-patches mailing list