diff options
-rw-r--r-- | constants.py | 5 | ||||
-rw-r--r-- | dispatch.py | 5 | ||||
-rw-r--r-- | installclass.py | 1 | ||||
-rw-r--r-- | instdata.py | 1 | ||||
-rw-r--r-- | packages.py | 14 |
5 files changed, 23 insertions, 3 deletions
diff --git a/constants.py b/constants.py index 930dd341a..543679b08 100644 --- a/constants.py +++ b/constants.py @@ -46,6 +46,11 @@ CHECK_DEPS = 0 IGNORE_DEPS = 1 RESOLVE_DEPS = 2 +# firstboot settings +FIRSTBOOT_DEFAULT = 0 +FIRSTBOOT_SKIP = 1 +FIRSTBOOT_RECONFIG = 2 + # common string needs to be easy to change import product productName = product.productName diff --git a/dispatch.py b/dispatch.py index e9d016fd1..cd46c6717 100644 --- a/dispatch.py +++ b/dispatch.py @@ -22,7 +22,7 @@ from packages import writeKSConfiguration, turnOnFilesystems from packages import doMigrateFilesystems from packages import queryUpgradeContinue from packages import doPreInstall, doPostInstall, doPostAction -from autopart import doAutoPartition +from autopart import doAutoPartition, firstbootConfiguration from partitioning import partitionMethodSetup, partitionObjectsInitialize from partitioning import partitioningComplete from floppy import makeBootdisk @@ -116,10 +116,10 @@ installSteps = [ ("installpackages", doInstall, ("method", "id", "intf", "instPath")), ("postinstallconfig", doPostInstall, ("method", "id", "intf", "instPath")), ("writeconfig", writeConfiguration, ("id", "instPath")), + ("firstboot", firstbootConfiguration, ("id", "instPath")), ("instbootloader", writeBootloader, ("intf", "instPath", "id.fsset", "id.bootloader", "id.langSupport", "id.comps")), - ("dopostaction", doPostAction, ("id", "instPath")), ("bootdisk", ("dir", "dispatch", "id.fsset")), ("makebootdisk", makeBootdisk, ("intf", "id.floppyDevice", "id.hdList", "instPath", "id.bootloader")), @@ -129,6 +129,7 @@ installSteps = [ "id.desktop", "id.comps", "instPath")), ("writexconfig", writeXConfiguration, ("id", "instPath")), ("writeksconfig", writeKSConfiguration, ("id", "instPath")), + ("dopostaction", doPostAction, ("id", "instPath")), ("complete", ()), ] diff --git a/installclass.py b/installclass.py index 15e4375e8..a4859ac25 100644 --- a/installclass.py +++ b/installclass.py @@ -117,6 +117,7 @@ class BaseInstallClass: "installpackages", "postinstallconfig", "writeconfig", + "firstboot", "instbootloader", "dopostaction", "writexconfig", diff --git a/instdata.py b/instdata.py index bdbc93498..75cf2f88c 100644 --- a/instdata.py +++ b/instdata.py @@ -74,6 +74,7 @@ class InstallData: self.upgradeSwapInfo = None self.upgradeDeps = "" self.configFileData = self.tmpData + self.firstboot = FIRSTBOOT_DEFAULT def setInstallProgressClass(self, c): self.instProgress = c diff --git a/packages.py b/packages.py index be51bcd27..1d4bee5fc 100644 --- a/packages.py +++ b/packages.py @@ -48,7 +48,19 @@ def queryUpgradeContinue(intf, dir): return DISPATCH_FORWARD def doPostAction(id, instPath): - id.instClass.postAction(instPath, flags.serial) + id.instClass.postAction(instPath, flags.serial) + +def firstbootConfiguration(id, instPath): + if id.firstboot == FIRSTBOOT_RECONFIG: + f = open(instPath + '/etc/reconfigSys', 'w+') + f.close() + elif id.firstboot == FIRSTBOOT_SKIP: + f = open(instPath + '/etc/sysconfig/firstboot', 'w+') + f.write('RUN_FIRSTBOOT=NO') + f.close() + + return + def writeConfiguration(id, instPath): log("Writing main configuration") |