[rhel7-branch][PATCH] Search for service files of all first boot utilities (#1060698)

Vratislav Podzimek vpodzime at redhat.com
Mon Feb 3 13:33:46 UTC 2014


If just Initial Setup gets installed, we should disable it if 'firstboot
--disable' appears in the kickstart file.

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

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index c5588d0..36d0710 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -580,7 +580,12 @@ class Firstboot(commands.firstboot.FC3_Firstboot):
             self.firstboot = FIRSTBOOT_SKIP
 
     def execute(self, *args):
-        if not os.path.exists(ROOT_PATH + "/lib/systemd/system/firstboot-graphical.service"):
+        service_paths = ("/lib/systemd/system/firstboot-graphical.service",
+                         "/lib/systemd/system/initial-setup-graphical.service",
+                         "/lib/systemd/system/initial-setup-text.service")
+
+        if not any(os.path.exists(ROOT_PATH + path) for path in service_paths):
+            # none of the first boot utilities installed, nothing to do here
             return
 
         action = "enable"
-- 
1.8.5.3



More information about the anaconda-patches mailing list