diff options
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/wic/imager/direct.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 38d4e78e62..c605e64238 100644 --- a/scripts/lib/wic/imager/direct.py +++ b/scripts/lib/wic/imager/direct.py | |||
| @@ -136,7 +136,7 @@ class DirectImageCreator(BaseImageCreator): | |||
| 136 | fstab_lines.append(fstab_entry) | 136 | fstab_lines.append(fstab_entry) |
| 137 | 137 | ||
| 138 | def _write_fstab(self, fstab, fstab_lines): | 138 | def _write_fstab(self, fstab, fstab_lines): |
| 139 | fstab = open(fstab, "w") | 139 | fstab = open(fstab + ".new", "w") |
| 140 | for line in fstab_lines: | 140 | for line in fstab_lines: |
| 141 | fstab.write(line) | 141 | fstab.write(line) |
| 142 | fstab.close() | 142 | fstab.close() |
| @@ -258,12 +258,9 @@ class DirectImageCreator(BaseImageCreator): | |||
| 258 | # self.assemble() calls Image.assemble() which calls | 258 | # self.assemble() calls Image.assemble() which calls |
| 259 | # __write_partitition() for each partition to dd the fs | 259 | # __write_partitition() for each partition to dd the fs |
| 260 | # into the partitions. | 260 | # into the partitions. |
| 261 | fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) | ||
| 262 | |||
| 263 | p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir, | 261 | p.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir, |
| 264 | self.bootimg_dir, self.kernel_dir, self.native_sysroot) | 262 | self.bootimg_dir, self.kernel_dir, self.native_sysroot) |
| 265 | 263 | ||
| 266 | self._restore_fstab(fstab) | ||
| 267 | 264 | ||
| 268 | self.__image.add_partition(int(p.size), | 265 | self.__image.add_partition(int(p.size), |
| 269 | p.disk, | 266 | p.disk, |
| @@ -277,6 +274,9 @@ class DirectImageCreator(BaseImageCreator): | |||
| 277 | no_table = p.no_table, | 274 | no_table = p.no_table, |
| 278 | part_type = p.part_type) | 275 | part_type = p.part_type) |
| 279 | 276 | ||
| 277 | fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) | ||
| 278 | self._restore_fstab(fstab) | ||
| 279 | |||
| 280 | self.__image.layout_partitions(self._ptable_format) | 280 | self.__image.layout_partitions(self._ptable_format) |
| 281 | 281 | ||
| 282 | self.__imgdir = self.workdir | 282 | self.__imgdir = self.workdir |
