Populate the ONL-CONFIG partition with a README.

- This is mostly infrastructure prove-out.
This commit is contained in:
Jeffrey Townsend
2016-08-12 19:03:04 +00:00
parent e508a8160b
commit 2e7df5b080
9 changed files with 35 additions and 2 deletions

View File

@@ -0,0 +1,2 @@
This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems.

View File

@@ -0,0 +1,2 @@
This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems.

View File

@@ -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"

View File

@@ -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"

View File

@@ -0,0 +1,2 @@
This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems.

View File

@@ -0,0 +1,2 @@
This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems.

View File

@@ -0,0 +1,2 @@
This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems.

View File

@@ -0,0 +1,2 @@
This partition contains system configuration data that is persistant across installations and upgrades of ONL-based systems.

View File

@@ -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