wic: do not overwrite autogenerated /etc/fstab with original too early
authorMaciej Borzecki <maciej.borzecki@open-rnd.pl>
Thu, 24 Jul 2014 12:27:16 +0000 (14:27 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 26 Jul 2014 08:01:05 +0000 (09:01 +0100)
commit3fa902912da5de76069980c692bc085c942b51aa
tree71cdbdb0c3aa84547a50549ef67e0d9a18795a52
parent387d9acc940bcb7051fb2752d271b4f147edc699
wic: do not overwrite autogenerated /etc/fstab with original too early

DirectImageCreator.__write_fstab() generates new /etc/fstab in sysroot
with rootfs contents. The fstab entries are generated base on the
initialn contents of /etc/fstab, plus any extra (other than / or
/boot) partitions listed in *.wks. A backup of original /etc/fstab is
done in a temp location. Subsequent call to __restore_fstab() restores
the backup copy, replacing the autogenerated one.

Calling __restore_fstab() before Wic_PartData.prepare() brings back the
original fstab before the partition image file actually is created. As
such, the autogenerated /etc/fstab will not make it to the partition.

(From OE-Core rev: a9e59d7b1fa1ed33ce9678fb77a367800d7a8f87)

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/mic/imager/direct.py