diff options
author | Martin Schwenke <martin@meltin.net> | 2019-03-20 16:11:32 +1100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-04-12 07:57:10 +0000 |
commit | f00827672cb061903d40b6c574e589febbb06a41 (patch) | |
tree | 6e2561cfd76fd3c135bd74267162176a0ebe01e0 | |
parent | 022b9a6ca7d8cb6f541b1b24b27da4e1a3bea04b (diff) | |
download | samba-f00827672cb061903d40b6c574e589febbb06a41.tar.gz |
ctdb-scripts: Factor out nfs_load_config()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13860
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@samba.org>
(cherry picked from commit 8de0a339b550e7363d265af04ad69f2179af75c6)
-rwxr-xr-x | ctdb/config/nfs-linux-kernel-callout | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ctdb/config/nfs-linux-kernel-callout b/ctdb/config/nfs-linux-kernel-callout index bd534c41a32..ca7e2b88e96 100755 --- a/ctdb/config/nfs-linux-kernel-callout +++ b/ctdb/config/nfs-linux-kernel-callout @@ -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 @@ -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 |