fix(nfs): support comma-separated networks in allowed_network field

This commit is contained in:
2026-03-31 12:10:00 +02:00
parent 77a3fea2d6
commit 3123d313c1
3 changed files with 90 additions and 14 deletions

View File

@@ -24,7 +24,13 @@ else
fi
bashio::log.info "Exporting ${MOUNT_PATH} to ${NETWORK} (${OPTIONS})..."
echo "${MOUNT_PATH} ${NETWORK}(${OPTIONS})" >> /etc/exports
EXPORT_LINE="${MOUNT_PATH}"
IFS=',' read -ra NETWORKS <<< "${NETWORK}"
for net in "${NETWORKS[@]}"; do
net=$(echo "${net}" | tr -d ' ')
EXPORT_LINE="${EXPORT_LINE} ${net}(${OPTIONS})"
done
echo "${EXPORT_LINE}" >> /etc/exports
done
fi