From: Martin Schwenke Date: Mon, 5 Mar 2018 10:01:17 +0000 (+1100) Subject: ctdb-scripts: Drop init script PID directory backward compatibility X-Git-Tag: talloc-2.1.12~217 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2c6c98302ea5630a18c4aa296a0a57b303e7c88;p=thirdparty%2Fsamba.git ctdb-scripts: Drop init script PID directory backward compatibility This tries to be backward compatible with very old versions of CTDB, so don't bother. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init index b9c0a6deb0f..621a9cbd7a4 100755 --- a/ctdb/config/ctdb.init +++ b/ctdb/config/ctdb.init @@ -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 } ############################################################