FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora SELinux Support

 
 
LinkBack Thread Tools
 
Old 08-08-2011, 12:54 PM
Ales Kozumplik
 
Default Avoid final hang if no reboot action is specified in kickstart.

Related: rhbz#728923
---
anaconda | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/anaconda b/anaconda
index a3a1172..6ca3391 100755
--- a/anaconda
+++ b/anaconda
@@ -793,7 +793,7 @@ if __name__ == "__main__":
os.system("systemctl --force --no-wall poweroff")
elif anaconda.ksdata.reboot.action == KS_WAIT:
os.system("systemctl --force --no-wall halt")
- elif anaconda.ksdata.reboot.action == KS_REBOOT:
+ else: # reboot action is KS_REBOOT or None
os.system("systemctl --force --no-wall reboot")
elif not flags.livecdInstall and not flags.imageInstall:
os.system("systemctl --force --no-wall reboot")
--
1.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 08-08-2011, 02:52 PM
Chris Lumens
 
Default Avoid final hang if no reboot action is specified in kickstart.

> diff --git a/anaconda b/anaconda
> index a3a1172..6ca3391 100755
> --- a/anaconda
> +++ b/anaconda
> @@ -793,7 +793,7 @@ if __name__ == "__main__":
> os.system("systemctl --force --no-wall poweroff")
> elif anaconda.ksdata.reboot.action == KS_WAIT:
> os.system("systemctl --force --no-wall halt")
> - elif anaconda.ksdata.reboot.action == KS_REBOOT:
> + else: # reboot action is KS_REBOOT or None
> os.system("systemctl --force --no-wall reboot")
> elif not flags.livecdInstall and not flags.imageInstall:
> os.system("systemctl --force --no-wall reboot")

Hm, I'm undecided whether it's better to do this or make it so there's
always a ksdata.reboot.action set.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 08-08-2011, 03:07 PM
Ales Kozumplik
 
Default Avoid final hang if no reboot action is specified in kickstart.

On 08/08/2011 04:52 PM, Chris Lumens wrote:

diff --git a/anaconda b/anaconda
index a3a1172..6ca3391 100755
--- a/anaconda
+++ b/anaconda
@@ -793,7 +793,7 @@ if __name__ == "__main__":
os.system("systemctl --force --no-wall poweroff")
elif anaconda.ksdata.reboot.action == KS_WAIT:
os.system("systemctl --force --no-wall halt")
- elif anaconda.ksdata.reboot.action == KS_REBOOT:
+ else: # reboot action is KS_REBOOT or None
os.system("systemctl --force --no-wall reboot")
elif not flags.livecdInstall and not flags.imageInstall:
os.system("systemctl --force --no-wall reboot")


Hm, I'm undecided whether it's better to do this or make it so there's
always a ksdata.reboot.action set.



First I was thinking:

--- a/pykickstart/commands/reboot.py
+++ b/pykickstart/commands/reboot.py
@@ -28,7 +28,7 @@ class FC3_Reboot(KickstartCommand):

def __init__(self, writePriority=0, *args, **kwargs):
KickstartCommand.__init__(self, writePriority, *args, **kwargs)
- self.action = kwargs.get("action", None)
+ self.action = kwargs.get("action", KS_REBOOT)

def __str__(self):
retval = KickstartCommand.__str__(self)

But then the next kickstart we would spew would have "reboot" and that
means the final screen is not displayed and the system is directly
rebooted because step "complete" is skipped (i.e. a different behavior).
So that would break idempotence.


Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 08-11-2011, 02:39 PM
Chris Lumens
 
Default Avoid final hang if no reboot action is specified in kickstart.

> First I was thinking:
>
> --- a/pykickstart/commands/reboot.py
> +++ b/pykickstart/commands/reboot.py
> @@ -28,7 +28,7 @@ class FC3_Reboot(KickstartCommand):
>
> def __init__(self, writePriority=0, *args, **kwargs):
> KickstartCommand.__init__(self, writePriority, *args, **kwargs)
> - self.action = kwargs.get("action", None)
> + self.action = kwargs.get("action", KS_REBOOT)
>
> def __str__(self):
> retval = KickstartCommand.__str__(self)
>
> But then the next kickstart we would spew would have "reboot" and
> that means the final screen is not displayed and the system is
> directly rebooted because step "complete" is skipped (i.e. a
> different behavior). So that would break idempotence.

Yep, that makes sense. Push it.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 02:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org