]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic:direct.py: ignore invalid mountpoints during fstab update
authorMarkus Volk <f_l_k@t-online.de>
Sat, 25 Sep 2021 18:01:37 +0000 (20:01 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 26 Sep 2021 13:36:49 +0000 (14:36 +0100)
wic fstab-update creates invalid entries for partitons that are not supposed to
be mounted from userspace eg u-boot partitions.

The following lines were added to fstab on a rock-pi-4:
/dev/mmcblk1p1 loader1 vfat defaults 0 0
/dev/mmcblk1p2 reserved1 vfat defaults 0 0
/dev/mmcblk1p3 reserved2 vfat defaults 0 0
/dev/mmcblk1p4 loader2 vfat defaults 0 0
/dev/mmcblk1p5 atf vfat defaults 0 0
/dev/mmcblk1p6 /boot vfat defaults 0 0

With this patch only valid entries should be added
/dev/mmcblk1p6 /boot vfat defaults 0 0

Signed-off-by: MarkusVolk <f_l_k@t-online.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/plugins/imager/direct.py

index 9d10ec01d087fa2db586ced711fe402fa4846406..495518fac81a10ecf2ee3bbe707b1e32245d655c 100644 (file)
@@ -117,7 +117,7 @@ class DirectPlugin(ImagerPlugin):
         updated = False
         for part in self.parts:
             if not part.realnum or not part.mountpoint \
-               or part.mountpoint == "/":
+               or part.mountpoint == "/" or not part.mountpoint.startswith('/'):
                 continue
 
             if part.use_uuid: