diff --git a/builds/amd64/installer/installed/builds/config/README b/builds/amd64/installer/installed/builds/config/README new file mode 100644 index 00000000..3e88e24e --- /dev/null +++ b/builds/amd64/installer/installed/builds/config/README @@ -0,0 +1,2 @@ +This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems. + diff --git a/builds/amd64/installer/swi/builds/config/README b/builds/amd64/installer/swi/builds/config/README new file mode 100644 index 00000000..3e88e24e --- /dev/null +++ b/builds/amd64/installer/swi/builds/config/README @@ -0,0 +1,2 @@ +This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems. + diff --git a/builds/any/installer/grub/builds/Makefile b/builds/any/installer/grub/builds/Makefile index 946fdfb0..a89a27cd 100644 --- a/builds/any/installer/grub/builds/Makefile +++ b/builds/any/installer/grub/builds/Makefile @@ -11,7 +11,7 @@ include $(ONL)/make/versions/version-onl.mk INSTALLER_NAME=$(FNAME_PRODUCT_VERSION)_ONL-OS_$(FNAME_BUILD_ID)_$(UARCH)_$(BOOTMODE)_INSTALLER __installer: - $(ONL)/tools/mkinstaller.py --arch $(ARCH) --boot-config boot-config --initrd onl-loader-initrd:$(ARCH) onl-loader-initrd-$(ARCH).cpio.gz --swi onl-swi:$(ARCH) --out $(INSTALLER_NAME) + $(ONL)/tools/mkinstaller.py --arch $(ARCH) --boot-config boot-config --add-dir config --initrd onl-loader-initrd:$(ARCH) onl-loader-initrd-$(ARCH).cpio.gz --swi onl-swi:$(ARCH) --out $(INSTALLER_NAME) md5sum "$(INSTALLER_NAME)" | awk '{ print $$1 }' > "$(INSTALLER_NAME).md5sum" diff --git a/builds/any/installer/uboot/builds/Makefile b/builds/any/installer/uboot/builds/Makefile index 2236fbde..b6073d5c 100644 --- a/builds/any/installer/uboot/builds/Makefile +++ b/builds/any/installer/uboot/builds/Makefile @@ -11,7 +11,7 @@ include $(ONL)/make/versions/version-onl.mk INSTALLER_NAME=$(FNAME_PRODUCT_VERSION)_ONL-OS_$(FNAME_BUILD_ID)_$(UARCH)_$(BOOTMODE)_INSTALLER __installer: - $(ONL)/tools/mkinstaller.py --arch $(ARCH) --boot-config boot-config --fit onl-loader-fit:$(ARCH) onl-loader-fit.itb --swi onl-swi:$(ARCH) --out $(INSTALLER_NAME) + $(ONL)/tools/mkinstaller.py --arch $(ARCH) --boot-config boot-config --add-dir config --fit onl-loader-fit:$(ARCH) onl-loader-fit.itb --swi onl-swi:$(ARCH) --out $(INSTALLER_NAME) md5sum "$(INSTALLER_NAME)" | awk '{ print $$1 }' > "$(INSTALLER_NAME).md5sum" diff --git a/builds/armel/installer/installed/builds/config/README b/builds/armel/installer/installed/builds/config/README new file mode 100644 index 00000000..3e88e24e --- /dev/null +++ b/builds/armel/installer/installed/builds/config/README @@ -0,0 +1,2 @@ +This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems. + diff --git a/builds/armel/installer/swi/builds/config/README b/builds/armel/installer/swi/builds/config/README new file mode 100644 index 00000000..3e88e24e --- /dev/null +++ b/builds/armel/installer/swi/builds/config/README @@ -0,0 +1,2 @@ +This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems. + diff --git a/builds/powerpc/installer/installed/builds/config/README b/builds/powerpc/installer/installed/builds/config/README new file mode 100644 index 00000000..3e88e24e --- /dev/null +++ b/builds/powerpc/installer/installed/builds/config/README @@ -0,0 +1,2 @@ +This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems. + diff --git a/builds/powerpc/installer/swi/builds/config/README b/builds/powerpc/installer/swi/builds/config/README new file mode 100644 index 00000000..3e88e24e --- /dev/null +++ b/builds/powerpc/installer/swi/builds/config/README @@ -0,0 +1,2 @@ +This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems. + diff --git a/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py b/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py index 023fb9f8..5acf66a6 100644 --- a/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py +++ b/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py @@ -357,6 +357,24 @@ class Base: return 0 + def installOnlConfig(self): + + try: + dev = self.blkidParts['ONL-CONFIG'] + except IndexError as ex: + self.log.warn("cannot find ONL-CONFIG partition : %s", str(ex)) + return 1 + + with MountContext(dev.device, log=self.log) as ctx: + for f in self.zf.namelist(): + d = 'config/' + if f.startswith(d) and f != d: + dst = os.path.join(ctx.dir, os.path.basename(f)) + if not os.path.exists(dst): + self.installerCopy(f, dst) + + return 0 + def assertUnmounted(self): """Make sure the install device does not have any active mounts.""" pm = ProcMountsParser() @@ -595,6 +613,9 @@ class GrubInstaller(SubprocessMixin, Base): code = self.installBootConfig() if code: return code + code = self.installOnlConfig() + if code: return code + code = self.installGrub() if code: return code