ctdb-scripts: Remove function rewrite_ctdb_options()
authorMartin Schwenke <martin@meltin.net>
Thu, 19 Apr 2018 11:57:07 +0000 (21:57 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 1 May 2018 14:20:37 +0000 (16:20 +0200)
This is no longer necessary after the removal of support for
CTDB_DBDIR=tmpfs.

File-local variable ctdb_rundir is no longer used, so drop it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Tue May  1 16:20:37 CEST 2018 on sn-devel-144

ctdb/config/functions

index 020a19a7c3f060644c2557303c42aafe40a035a7..69b51724249fc102a97e077c5296e8978a3b8086 100755 (executable)
@@ -11,7 +11,6 @@ export CTDB_BASE
 # CTDB_VARDIR is used elsewhere
 # shellcheck disable=SC2034
 CTDB_VARDIR="/usr/local/var/lib/ctdb"
-ctdb_rundir="/usr/local/var/run/ctdb"
 
 CTDB="${CTDB:-/usr/local/bin/ctdb}"
 
@@ -32,30 +31,6 @@ fi
 #######################################
 # pull in a system config file, if any
 
-rewrite_ctdb_options ()
-{
-    case "$CTDB_DBDIR" in
-       tmpfs|tmpfs:*)
-           _opts_defaults="mode=700"
-           # Get any extra options specified after colon
-           if [ "$CTDB_DBDIR" = "tmpfs" ] ; then
-               _opts=""
-           else
-               _opts="${CTDB_DBDIR#tmpfs:}"
-           fi
-           # It is OK to repeat mount options - last value wins.
-           # CTDB_DBDIR_TMPFS_OPTIONS is used by ctdbd_wrapper
-           # shellcheck disable=SC2034
-           CTDB_DBDIR_TMPFS_OPTIONS="${_opts_defaults}${_opts:+,}${_opts}"
-
-           CTDB_DBDIR="${ctdb_rundir}/CTDB_DBDIR"
-           ;;
-       *)
-           # shellcheck disable=SC2034
-           CTDB_DBDIR_TMPFS_OPTIONS=""
-    esac
-}
-
 load_system_config ()
 {
        if [ -z "$1" ] ; then
@@ -77,7 +52,6 @@ loadconfig() {
        if [ -r "$_config" ] ; then
                . "$_config"
        fi
-       rewrite_ctdb_options
 }
 
 load_script_options ()