1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-scripts: Drop uses of ctdbd_wrapper

The only value this now provides is use of a notification script to
log when start/stop are called.  This was used for debugging strange
start/stop failures, which have not been recently seen.  Also, systemd
does a good job of logging start/stop.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2022-02-01 08:28:47 +11:00 committed by Amitay Isaacs
parent aca5972233
commit a1e78cc372
2 changed files with 9 additions and 12 deletions

View File

@ -55,7 +55,7 @@ detect_init_style
export CTDB_INIT_STYLE
ctdbd="${CTDBD:-/usr/sbin/ctdbd}"
ctdbd_wrapper="${CTDBD_WRAPPER:-/usr/sbin/ctdbd_wrapper}"
ctdb="${CTDB:-/usr/bin/ctdb}"
pidfile="/var/run/ctdb/ctdbd.pid"
############################################################
@ -66,21 +66,18 @@ start()
case "$CTDB_INIT_STYLE" in
suse)
startproc \
"$ctdbd_wrapper" "start"
startproc "$ctdbd"
rc_status -v
;;
redhat)
daemon --pidfile "$pidfile" \
"$ctdbd_wrapper" "start"
daemon --pidfile "$pidfile" "$ctdbd"
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ctdb || RETVAL=1
return $RETVAL
;;
debian)
eval start-stop-daemon --start --quiet --background --exec \
"$ctdbd_wrapper" "start"
eval start-stop-daemon --start --quiet --background --exec "$ctdbd"
;;
esac
}
@ -91,11 +88,11 @@ stop()
case "$CTDB_INIT_STYLE" in
suse)
"$ctdbd_wrapper" "stop"
"$ctdb" "shutdown"
rc_status -v
;;
redhat)
"$ctdbd_wrapper" "stop"
"$ctdb" "shutdown"
RETVAL=$?
# Common idiom in Red Hat init scripts - success() always
# succeeds so this does behave like if-then-else
@ -106,7 +103,7 @@ stop()
return $RETVAL
;;
debian)
"$ctdbd_wrapper" "stop"
"$ctdb" "shutdown"
log_end_msg $?
;;
esac

View File

@ -10,8 +10,8 @@ LimitCORE=infinity
LimitNOFILE=1048576
TasksMax=4096
PIDFile=@CTDB_RUNDIR@/ctdbd.pid
ExecStart=@SBINDIR@/ctdbd_wrapper start
ExecStop=@SBINDIR@/ctdbd_wrapper stop
ExecStart=@SBINDIR@/ctdbd
ExecStop=@BINDIR@/ctdb shutdown
KillMode=control-group
Restart=no