Similarly to the 'extlinux' attribute of the 'installerfw' KS command, start
supporitng the 'fstab' attribute. This means, for example, if the KS file has
this command:
installerfw "extlinux,fstab"
then MIC will not install/configure extlinux, and it will not generate
/etc/fstab. Instead, installer framework scripts will do that.
I've added the support only to raw images, since installerfw "extlinux" is
allso supported only by raw images. The liveusb support can be added later. I
do not do this because I cannot test liveusb images at this point, so I am
afraid of breaking it.
Change-Id: Ic6bb7241783aeff571956762a42665fcd8881e3f
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
raise CreatorError("No repositories specified")
def __write_fstab(self):
- fstab = open(self._instroot + "/etc/fstab", "w")
- fstab.write(self._get_fstab())
- fstab.close()
+ fstab_contents = self._get_fstab()
+ if fstab_contents:
+ fstab = open(self._instroot + "/etc/fstab", "w")
+ fstab.write(fstab_contents)
+ fstab.close()
def __create_minimal_dev(self):
"""Create a minimal /dev so that we don't corrupt the host /dev"""
BaseImageCreator.configure(self, repodata)
def _get_fstab(self):
+ if kickstart.use_installerfw(self.ks, "fstab"):
+ # The fstab file will be generated by installer framework scripts
+ # instead.
+ return None
+
s = ""
for mp in self.__instloop.mountOrder:
p = None