From: Hugo Villeneuve Date: Sat, 2 Mar 2024 21:14:49 +0000 (-0500) Subject: Add support to mount NFS share X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=4dccfdfcbed241c59588eea6811115d1c93da48d;p=yocto%2Fmeta-hvmpd.git Add support to mount NFS share --- 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: