summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/partition.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/partition.py')
-rw-r--r--scripts/lib/wic/partition.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index e0b2c5bdf2..ab304f1b2a 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -54,6 +54,7 @@ class Partition():
54 self.uuid = args.uuid 54 self.uuid = args.uuid
55 self.fsuuid = args.fsuuid 55 self.fsuuid = args.fsuuid
56 self.type = args.type 56 self.type = args.type
57 self.no_fstab_update = args.no_fstab_update
57 self.updated_fstab_path = None 58 self.updated_fstab_path = None
58 self.has_fstab = False 59 self.has_fstab = False
59 self.update_fstab_in_rootfs = False 60 self.update_fstab_in_rootfs = False
@@ -286,7 +287,7 @@ class Partition():
286 (self.fstype, extraopts, rootfs, label_str, self.fsuuid, rootfs_dir) 287 (self.fstype, extraopts, rootfs, label_str, self.fsuuid, rootfs_dir)
287 exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo) 288 exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
288 289
289 if self.updated_fstab_path and self.has_fstab: 290 if self.updated_fstab_path and self.has_fstab and not self.no_fstab_update:
290 debugfs_script_path = os.path.join(cr_workdir, "debugfs_script") 291 debugfs_script_path = os.path.join(cr_workdir, "debugfs_script")
291 with open(debugfs_script_path, "w") as f: 292 with open(debugfs_script_path, "w") as f:
292 f.write("cd etc\n") 293 f.write("cd etc\n")
@@ -350,7 +351,7 @@ class Partition():
350 mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir) 351 mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir)
351 exec_native_cmd(mcopy_cmd, native_sysroot) 352 exec_native_cmd(mcopy_cmd, native_sysroot)
352 353
353 if self.updated_fstab_path and self.has_fstab: 354 if self.updated_fstab_path and self.has_fstab and not self.no_fstab_update:
354 mcopy_cmd = "mcopy -i %s %s ::/etc/fstab" % (rootfs, self.updated_fstab_path) 355 mcopy_cmd = "mcopy -i %s %s ::/etc/fstab" % (rootfs, self.updated_fstab_path)
355 exec_native_cmd(mcopy_cmd, native_sysroot) 356 exec_native_cmd(mcopy_cmd, native_sysroot)
356 357