diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/imager/direct.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index c605e64238..d368401af4 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 + ".new", "w") | 139 | fstab = open(fstab, "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() |
@@ -250,6 +250,8 @@ class DirectImageCreator(BaseImageCreator): | |||
250 | if not self.ks.handler.bootloader.source and p.mountpoint == "/boot": | 250 | if not self.ks.handler.bootloader.source and p.mountpoint == "/boot": |
251 | self.ks.handler.bootloader.source = p.source | 251 | self.ks.handler.bootloader.source = p.source |
252 | 252 | ||
253 | fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) | ||
254 | |||
253 | for p in parts: | 255 | for p in parts: |
254 | # need to create the filesystems in order to get their | 256 | # need to create the filesystems in order to get their |
255 | # sizes before we can add them and do the layout. | 257 | # sizes before we can add them and do the layout. |
@@ -274,7 +276,6 @@ class DirectImageCreator(BaseImageCreator): | |||
274 | no_table = p.no_table, | 276 | no_table = p.no_table, |
275 | part_type = p.part_type) | 277 | part_type = p.part_type) |
276 | 278 | ||
277 | fstab = self.__write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) | ||
278 | self._restore_fstab(fstab) | 279 | self._restore_fstab(fstab) |
279 | 280 | ||
280 | self.__image.layout_partitions(self._ptable_format) | 281 | self.__image.layout_partitions(self._ptable_format) |