From 4dccfdfcbed241c59588eea6811115d1c93da48d Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Sat, 2 Mar 2024 16:14:49 -0500 Subject: [PATCH] Add support to mount NFS share --- recipes-core/base-files/base-files_%.bbappend | 7 +++++++ recipes-core/images/include/image-hvmpd-common.inc | 1 + 2 files changed, 8 insertions(+) diff --git a/recipes-core/base-files/base-files_%.bbappend b/recipes-core/base-files/base-files_%.bbappend index 6580860..b9f8906 100644 --- a/recipes-core/base-files/base-files_%.bbappend +++ b/recipes-core/base-files/base-files_%.bbappend @@ -21,6 +21,8 @@ do_install:append () { echo "# Manually added entries for HV MPD server project:" >> \ ${D}${sysconfdir}/fstab + # Note: mount points will be automatically created when using systemd. + if [ x"${BOOT_PART_ID}" != x"" ]; then echo "${ROOT_PARENT_DEV}${ROOT_PART_PREFIX}${BOOT_PART_ID} /boot auto defaults 0 0" >> \ ${D}${sysconfdir}/fstab @@ -30,4 +32,9 @@ do_install:append () { echo "${ROOT_PARENT_DEV}${ROOT_PART_PREFIX}${DATA_PART_ID} /mnt/data auto defaults 0 0" >> \ ${D}${sysconfdir}/fstab fi + + if [ "${NFS_SERVER}" != "" ]; then + echo "${NFS_SERVER}:${NFS_SERVER_DIR} ${NFS_MOUNT_POINT} nfs bg,nolock 0 0" >> \ + ${D}${sysconfdir}/fstab + fi } diff --git a/recipes-core/images/include/image-hvmpd-common.inc b/recipes-core/images/include/image-hvmpd-common.inc index e685439..ddee2a4 100644 --- a/recipes-core/images/include/image-hvmpd-common.inc +++ b/recipes-core/images/include/image-hvmpd-common.inc @@ -16,6 +16,7 @@ IMAGE_INSTALL:append = " \ evtest \ i2c-tools \ ethtool \ + nfs-utils \ " # Music server specific features/components: -- 2.20.1