summaryrefslogtreecommitdiffstats
path: root/pyanaconda
diff options
context:
space:
mode:
Diffstat (limited to 'pyanaconda')
-rw-r--r--pyanaconda/__init__.py9
-rw-r--r--pyanaconda/dispatch.py2
-rw-r--r--pyanaconda/install.py1
-rw-r--r--pyanaconda/kickstart.py18
-rw-r--r--pyanaconda/packages.py11
-rw-r--r--pyanaconda/ui/gui/TODO2
6 files changed, 21 insertions, 22 deletions
diff --git a/pyanaconda/__init__.py b/pyanaconda/__init__.py
index 58ec85253..7991afbf3 100644
--- a/pyanaconda/__init__.py
+++ b/pyanaconda/__init__.py
@@ -107,15 +107,6 @@ class Anaconda(object):
return self._bootloader
@property
- def firstboot(self):
- from pykickstart.constants import FIRSTBOOT_DEFAULT
-
- if self.ksdata:
- return self.ksdata.firstboot.firstboot
- else:
- return FIRSTBOOT_DEFAULT
-
- @property
def instClass(self):
if not self._instClass:
from installclass import DefaultInstall
diff --git a/pyanaconda/dispatch.py b/pyanaconda/dispatch.py
index e04d3a9b6..d8bb6d095 100644
--- a/pyanaconda/dispatch.py
+++ b/pyanaconda/dispatch.py
@@ -26,7 +26,6 @@ from types import *
import indexed_dict
from constants import *
from packages import doPostAction
-from packages import firstbootConfiguration
from packages import setupTimezone
from storage import storageInitialize
from storage import storageComplete
@@ -269,7 +268,6 @@ class Dispatcher(object):
self.add_step("installpackages", doInstall)
self.add_step("postinstallconfig", doPostInstall)
self.add_step("writeconfig", writeConfiguration)
- self.add_step("firstboot", firstbootConfiguration)
self.add_step("instbootloader", writeBootLoader)
self.add_step("reipl", doReIPL)
self.add_step("methodcomplete", doMethodComplete)
diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index ac5fe4259..3f43007c9 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -73,6 +73,7 @@ def doInstall(storage, payload, ksdata, instClass):
# Now run the execute methods of ksdata that require an installed system
# to be present first.
+ ksdata.firstboot.execute(storage, ksdata, instClass)
ksdata.services.execute(storage, ksdata, instClass)
ksdata.keyboard.execute(storage, ksdata, instClass)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index d3e2924b0..de46e38c4 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -414,6 +414,23 @@ class Fcoe(commands.fcoe.F13_Fcoe):
return fc
+class Firstboot(commands.firstboot.FC3_Firstboot):
+ def execute(self, *args):
+ if not os.path.exists("/lib/systemd/system/firstboot-graphical.service"):
+ return
+
+ action = "enable"
+
+ if self.firstboot == FIRSTBOOT_SKIP:
+ action = "disable"
+ elif self.firstboot == FIRSTBOOT_RECONFIG:
+ f = open(ROOT_PATH + "/etc/reconfigSys", "w+")
+ f.close()
+
+ iutil.execWithRedirect("systemctl", [action, "firstboot-graphical.service"],
+ stdout="/dev/tty5", stderr="/dev/tty5",
+ root=ROOT_PATH)
+
class IgnoreDisk(commands.ignoredisk.RHEL6_IgnoreDisk):
def parse(self, args):
retval = commands.ignoredisk.RHEL6_IgnoreDisk.parse(self, args)
@@ -1250,6 +1267,7 @@ commandMap = {
"clearpart": ClearPart,
"dmraid": DmRaid,
"fcoe": Fcoe,
+ "firstboot": Firstboot,
"ignoredisk": IgnoreDisk,
"iscsi": Iscsi,
"iscsiname": IscsiName,
diff --git a/pyanaconda/packages.py b/pyanaconda/packages.py
index dc503e5bb..334ee4a51 100644
--- a/pyanaconda/packages.py
+++ b/pyanaconda/packages.py
@@ -39,17 +39,6 @@ _ = lambda x: gettext.ldgettext("anaconda", x)
def doPostAction(anaconda):
anaconda.instClass.postAction(anaconda)
-def firstbootConfiguration(anaconda):
- if anaconda.firstboot == FIRSTBOOT_RECONFIG:
- f = open(ROOT_PATH + '/etc/reconfigSys', 'w+')
- f.close()
- elif anaconda.firstboot == FIRSTBOOT_SKIP:
- f = open(ROOT_PATH + '/etc/sysconfig/firstboot', 'w+')
- f.write('RUN_FIRSTBOOT=NO')
- f.close()
-
- return
-
def setupTimezone(anaconda):
# we don't need this on an upgrade or going backwards
if anaconda.upgrade or flags.imageInstall or anaconda.dir == DISPATCH_BACK:
diff --git a/pyanaconda/ui/gui/TODO b/pyanaconda/ui/gui/TODO
index b228a30e5..cb5713e84 100644
--- a/pyanaconda/ui/gui/TODO
+++ b/pyanaconda/ui/gui/TODO
@@ -13,6 +13,8 @@ Fedora 18
where you go next.
- The setting on the welcome screen does not get reflected on the language and keyboard spokes.
- Something causes the up and down arrows to resize the anaconda window.
+- Some interactive install defaults are different from kickstart (firstboot, ?). These need to
+ be loaded somewhere up front for an interactive install.
+ Update exception handling. This requires updating python-meh to use gtk3,
which also requires updating firstboot and s-c-ks to gtk3. I want to turn
s-c-ks into an anaconda wrapper first, though.