From 79706aeae311756f0556ae5ab8300c2172a38e7d Mon Sep 17 00:00:00 2001 From: dlandon Date: Wed, 8 Jan 2025 18:41:54 -0600 Subject: [PATCH 1/2] Fix nfs ui so changes can be made while nfs is enabled. --- emhttp/plugins/dynamix/NFS.page | 63 +++++++++++++++++++++- emhttp/plugins/dynamix/scripts/nfsSettings | 43 +++++++++++++++ 2 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 emhttp/plugins/dynamix/scripts/nfsSettings diff --git a/emhttp/plugins/dynamix/NFS.page b/emhttp/plugins/dynamix/NFS.page index b321269aa..5cbbb023d 100644 --- a/emhttp/plugins/dynamix/NFS.page +++ b/emhttp/plugins/dynamix/NFS.page @@ -15,6 +15,13 @@ Tag="linux" * all copies or substantial portions of the Software. */ ?> + + +
+ _(Enable NFS)_: : +: :nfs_tunable_fuse_remember_help:   : -
\ No newline at end of file + + +
+ + + + + +_(Max Server Protocol Version)_: +: + +:nfs_server_max_protocol_help: + +_(Number of Threads)_: +: + +:nfs_threads_help: + +  +: +
+ + diff --git a/emhttp/plugins/dynamix/scripts/nfsSettings b/emhttp/plugins/dynamix/scripts/nfsSettings new file mode 100644 index 000000000..8bfd6dc1b --- /dev/null +++ b/emhttp/plugins/dynamix/scripts/nfsSettings @@ -0,0 +1,43 @@ +#!/bin/bash +# Usage: +# apply|nfs_version|nfs_count +# + +apply() { + echo "RPC_NFSD_VERS=\"$RPC_NFSD_VERS\"" > $CONFIG_RAM + echo "RPC_NFSD_COUNT=\"$RPC_NFSD_COUNT\"" >> $CONFIG_RAM + if /etc/rc.d/rc.nfsd status >/dev/null ; then + /etc/rc.d/rc.nfsd restart + fi +} + +nfs_version() { + echo $RPC_NFSD_VERS +} + +nfs_count() { + echo $RPC_NFSD_COUNT +} + +# Path to the configuration files +CONFIG_ROM="/etc/default/nfs" +CONFIG_RAM="/boot/config/default/nfs" + +# Get current settings +source "$CONFIG_RAM" + +case "$1" in + 'apply') + RPC_NFSD_VERS="$2" + RPC_NFSD_COUNT="$3" + apply + ;; + 'nfs_version') + nfs_version + ;; + 'nfs_count') + nfs_count + ;; + *) + echo "usage $0 apply|nfs_version|nfs_count" +esac From 8760a00ff28a8932a6c442850646a819d7d3688b Mon Sep 17 00:00:00 2001 From: dlandon Date: Wed, 8 Jan 2025 18:45:17 -0600 Subject: [PATCH 2/2] Make script executable --- emhttp/plugins/dynamix/scripts/nfsSettings | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 emhttp/plugins/dynamix/scripts/nfsSettings diff --git a/emhttp/plugins/dynamix/scripts/nfsSettings b/emhttp/plugins/dynamix/scripts/nfsSettings old mode 100644 new mode 100755