From a7f21923d1fa5bf26987832ff97401c89c53d479 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Thu, 27 Jun 2013 07:35:55 +0300 Subject: [PATCH] raw: support the 'fstab' installerfw attribute 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 --- mic/imager/baseimager.py | 8 +++++--- mic/imager/raw.py | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/mic/imager/baseimager.py b/mic/imager/baseimager.py index c5672f5..40d011d 100644 --- a/mic/imager/baseimager.py +++ b/mic/imager/baseimager.py @@ -684,9 +684,11 @@ class BaseImageCreator(object): 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""" diff --git a/mic/imager/raw.py b/mic/imager/raw.py index 407d984..838191a 100644 --- a/mic/imager/raw.py +++ b/mic/imager/raw.py @@ -77,6 +77,11 @@ class RawImageCreator(BaseImageCreator): 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 -- 2.7.4