Skip to content

Commit

Permalink
ctdb-scripts: Factor out nfs_load_config()
Browse files Browse the repository at this point in the history
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13860

Signed-off-by: Martin Schwenke <[email protected]>
Reviewed-by: Amitay Isaacs <[email protected]>
  • Loading branch information
martin-schwenke authored and Martin Schwenke committed Mar 31, 2019
1 parent e72c3c8 commit 8de0a33
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ctdb/config/nfs-linux-kernel-callout
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ EOF
exit 1
}

##################################################

nfs_load_config ()
{
_config="${1:-${nfs_config}}"

if [ -r "$_config" ] ; then
. "$_config"
fi
}

##################################################
# Basic service stop and start
Expand Down Expand Up @@ -167,9 +177,7 @@ nfs_startup ()
nfs_check_thread_count ()
{
# Load NFS configuration to get desired number of threads.
if [ -r "$nfs_config" ] ; then
. "$nfs_config"
fi
nfs_load_config

# If $RPCNFSDCOUNT/$USE_KERNEL_NFSD_NUMBER isn't set then we could
# guess the default from the initscript. However, let's just
Expand Down

0 comments on commit 8de0a33

Please sign in to comment.