mirror of
https://github.com/unraid/webgui.git
synced 2026-05-02 15:59:35 -05:00
40 lines
566 B
Bash
Executable File
40 lines
566 B
Bash
Executable File
#!/bin/bash
|
|
# Usage:
|
|
# apply|nfs_version|nfs_count
|
|
#
|
|
|
|
apply() {
|
|
echo "RPC_NFSD_VERS=\"$RPC_NFSD_VERS\"" > $CONFIG
|
|
echo "RPC_NFSD_COUNT=\"$RPC_NFSD_COUNT\"" >> $CONFIG
|
|
}
|
|
|
|
nfs_version() {
|
|
echo $RPC_NFSD_VERS
|
|
}
|
|
|
|
nfs_count() {
|
|
echo $RPC_NFSD_COUNT
|
|
}
|
|
|
|
# Path to the configuration file
|
|
CONFIG="/boot/config/default/nfs"
|
|
|
|
# Get the values from the file
|
|
source "$CONFIG"
|
|
|
|
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
|