]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-scripts: Drop init script PID directory backward compatibility
authorMartin Schwenke <martin@meltin.net>
Mon, 5 Mar 2018 10:01:17 +0000 (21:01 +1100)
committerMartin Schwenke <martins@samba.org>
Fri, 9 Mar 2018 06:08:24 +0000 (07:08 +0100)
This tries to be backward compatible with very old versions of CTDB,
so don't bother.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/ctdb.init

index b9c0a6deb0f45ef66c7805e2c1a90ca19f6def54..621a9cbd7a4bed08317114436f67a01bc2b869c7 100755 (executable)
@@ -118,31 +118,18 @@ restart()
 
 check_status ()
 {
-    # Backward compatibility.  When we arrange to pass --pidfile to
-    # ctdbd we also create the directory that will contain it.  If
-    # that directory is missing then we don't use the pidfile to check
-    # status.  Note that this probably won't work if
-    # $CTDB_VALGRIND="yes" but this doesn't need full backward
-    # compatibility because it is a debug option.
-    _d=$(dirname "$pidfile")
-    if [ -d "$_d" ] ; then
-       _pf_opt="-p $pidfile"
-    else
-       _pf_opt=""
-    fi
-
-    case "$CTDB_INIT_STYLE" in
+       case "$CTDB_INIT_STYLE" in
        suse)
-           checkproc $_pf_opt "$ctdbd"
-           rc_status -v
-           ;;
+               checkproc -p "$pidfile" "$ctdbd"
+               rc_status -v
+               ;;
        redhat)
-           status $_pf_opt -l "ctdb" "$ctdbd"
-           ;;
+               status -p "$pidfile" -l "ctdb" "$ctdbd"
+               ;;
        debian)
-           status_of_proc $_pf_opt "$ctdbd" "ctdb"
-           ;;
-    esac
+               status_of_proc -p "$pidfile" "$ctdbd" "ctdb"
+               ;;
+       esac
 }
 
 ############################################################