mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
wic: When using --use-uuid make sure that we update the fstab with PARTUUID
When we have been told to use the UUID we should also update the fstab to make use of PARTUUID instead of hard-coding the device in question. This will make the resulting image much more portable. (From OE-Core rev: e7443e7cf876d9bbe326033ac5eee0b98ce5d37f) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
35730f8735
commit
7707961e9f
|
@ -140,9 +140,12 @@ class DirectPlugin(ImagerPlugin):
|
|||
or part.mountpoint == "/":
|
||||
continue
|
||||
|
||||
# mmc device partitions are named mmcblk0p1, mmcblk0p2..
|
||||
prefix = 'p' if part.disk.startswith('mmcblk') else ''
|
||||
device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
|
||||
if part.use_uuid:
|
||||
device_name = "PARTUUID=%s" % part.uuid
|
||||
else:
|
||||
# mmc device partitions are named mmcblk0p1, mmcblk0p2..
|
||||
prefix = 'p' if part.disk.startswith('mmcblk') else ''
|
||||
device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
|
||||
|
||||
opts = part.fsopts if part.fsopts else "defaults"
|
||||
line = "\t".join([device_name, part.mountpoint, part.fstype,
|
||||
|
|
Loading…
Reference in New Issue
Block a user