mirror of
https://github.com/unraid/webgui.git
synced 2025-12-31 14:40:36 -06:00
46 lines
849 B
Bash
Executable File
46 lines
849 B
Bash
Executable File
#!/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_ROM"
|
|
|
|
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"
|
|
exit 1
|
|
;;
|
|
esac
|