ctdb-scripts: Section off GPFS-specific functionality in nfs-ganesha-callout
authorJose A. Rivera <jarrpa@samba.org>
Tue, 3 May 2016 06:53:07 +0000 (01:53 -0500)
committerMartin Schwenke <martins@samba.org>
Fri, 13 May 2016 21:37:25 +0000 (23:37 +0200)
Signed-off-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/doc/examples/nfs-ganesha-callout

index 06d08ad00e3ae7e37bde09464852659b25ccc6f7..7351e3461649ceb411835a292d0dec4100b45f65 100755 (executable)
@@ -51,6 +51,12 @@ nfs_service="${CTDB_NFS_SERVICE:-nfs-ganesha}"
 ganesha_rec_subdir=${CTDB_GANESHA_REC_SUBDIR:-.ganesha}
 procfs=${PROCFS_PATH:-/proc}
 
+case $state_fs in
+    gpfs)
+        GANRECDIR="/var/lib/nfs/ganesha"
+        ;;
+esac
+
 
 ##################################################
 
@@ -128,8 +134,6 @@ service_start ()
 ##################################################
 # Nitty gritty - monitoring and IP handling
 
-GANRECDIR="/var/lib/nfs/ganesha"
-
 # Check that a symlink exists, create it otherwise.
 # Usage: check_ln <TARGET> <LINK>
 check_ln ()
@@ -170,10 +174,15 @@ create_ganesha_recdirs ()
       echo "startup $state_fs not ready"
       exit 0
     fi
-    _mntpt=$(echo "$_mounts" | sort | awk 'NR == 1 {print $3}')
-    _link_dst="${_mntpt}/${ganesha_rec_subdir}"
-    mkdir -vp "$_link_dst"
-    check_ln "$_link_dst" "$GANRECDIR"
+
+    case $state_fs in
+        gpfs)
+            _mntpt=$(echo "$_mounts" | sort | awk 'NR == 1 {print $3}')
+            _link_dst="${_mntpt}/${ganesha_rec_subdir}"
+            mkdir -vp "$_link_dst"
+            check_ln "$_link_dst" "$GANRECDIR"
+            ;;
+   esac
 }
 
 service_check ()