summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-03-01 13:54:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-10 10:47:41 +0000
commit0393438b94e5ef88d911029c54576314d38a62b2 (patch)
treea6e97c01e83f004518f188dce4b57a3e9c6496ea /scripts
parent5cfac6b9e9eff0a9fbc4f4e595d688c1be083381 (diff)
downloadast2050-yocto-poky-0393438b94e5ef88d911029c54576314d38a62b2.zip
ast2050-yocto-poky-0393438b94e5ef88d911029c54576314d38a62b2.tar.gz
wic: fix fstab generation
Commit 0a6668f6e60b4195ff4163c00fc972bacdb27b4b still included some debug and is not working properly as the new fstab is generated too late. (From OE-Core rev: eea80d25c0902bb16ed3425888857d3cc5486376) Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/imager/direct.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index c605e64..d368401 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -136,7 +136,7 @@ class DirectImageCreator(BaseImageCreator):
fstab_lines.append(fstab_entry)
def _write_fstab(self, fstab, fstab_lines):
- fstab = open(fstab + ".new", "w")
+ fstab = open(fstab, "w")
for line in fstab_lines:
fstab.write(line)
fstab.close()
@@ -250,6 +250,8 @@ class DirectImageCreator(BaseImageCreator):
if not self.ks.handler.bootloader.source and p.mountpoint == "/boot":
self.ks.handler.bootloader.source = p.source
+ fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
+
for p in parts:
# need to create the filesystems in order to get their
# sizes before we can add them and do the layout.
@@ -274,7 +276,6 @@ class DirectImageCreator(BaseImageCreator):
no_table = p.no_table,
part_type = p.part_type)
- fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
self._restore_fstab(fstab)
self.__image.layout_partitions(self._ptable_format)
OpenPOWER on IntegriCloud