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

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