fstab: add optional data partition support
authorHugo Villeneuve <hugo@hugovil.com>
Sun, 22 Jan 2023 22:26:58 +0000 (17:26 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 1 Mar 2023 17:10:15 +0000 (12:10 -0500)
recipes-core/base-files/base-files_%.bbappend

index f3e66ea..bae34c0 100644 (file)
@@ -24,4 +24,8 @@ do_install:append () {
         echo "${ROOT_PARENT_DEV}${ROOT_PART_PREFIX}${BOOT_PART_ID}       /boot            auto       defaults              0  0" >> \
             ${D}${sysconfdir}/fstab
     fi
+    if [ x"${DATA_PART_ID}" != x"" ]; then
+        echo "${ROOT_PARENT_DEV}${ROOT_PART_PREFIX}${DATA_PART_ID}       /mnt/data        auto       defaults              0  0" >> \
+            ${D}${sysconfdir}/fstab
+    fi
 }