[PATCH 3/3] Reboot the system if EULA is not agreed (#1000409)

Vratislav Podzimek vpodzime at redhat.com
Tue Oct 8 08:25:13 UTC 2013


Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 initial_setup/__main__.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/initial_setup/__main__.py b/initial_setup/__main__.py
index ffe5db6..dc6d23f 100644
--- a/initial_setup/__main__.py
+++ b/initial_setup/__main__.py
@@ -102,7 +102,11 @@ ret = ui.run()
 # TUI returns False if the app was ended prematurely
 # all other cases return True or None
 if ret == False:
-    sys.exit(0)
+    if data.eula.agreed:
+        sys.exit(0)
+    else:
+        # EULA not agreed, reboot the system and leave Initial Setup enabled
+        os.system("reboot")
 
 # Do not execute sections that were part of the original
 # anaconda kickstart file (== have .seen flag set)
-- 
1.7.11.7



More information about the anaconda-patches mailing list