[master/rhel7-branch][PATCH] Firstboot should be disabled by default after automated installations

Vratislav Podzimek vpodzime at redhat.com
Tue Sep 10 12:15:27 UTC 2013


Resolves: rhbz#985277

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/install.py   | 1 +
 pyanaconda/kickstart.py | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index 4b23016..0742d6f 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -131,6 +131,7 @@ def doInstall(storage, payload, ksdata, instClass):
             threadMgr.wait_all()
 
     with progress_report(_("Setting up the installation environment")):
+        ksdata.firstboot.setup(storage, ksdata, instClass)
         ksdata.addons.setup(storage, ksdata, instClass)
 
     storage.updateKSData()  # this puts custom storage info into ksdata
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index d6baaaa..3963889 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -531,6 +531,11 @@ class Firewall(commands.firewall.F14_Firewall):
             iutil.execWithRedirect(cmd, args, root=ROOT_PATH)
 
 class Firstboot(commands.firstboot.FC3_Firstboot):
+    def setup(self, *args):
+        # firstboot should be disabled by default after kickstart installations
+        if flags.automatedInstall and not self.seen:
+            self.firstboot = FIRSTBOOT_SKIP
+
     def execute(self, *args):
         action = "enable"
 
-- 
1.7.11.7



More information about the anaconda-patches mailing list