diff options
author | Martin Schwenke <martin@meltin.net> | 2022-02-01 08:28:47 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2022-04-06 06:34:37 +0000 |
commit | a1e78cc372618159e5c95665b827936280572b61 (patch) | |
tree | 7985052943f1b1aec543a454d7614ad19f9058d3 | |
parent | aca59722338aacffc37bdb5d8c0603f1bb0c3cb4 (diff) | |
download | samba-a1e78cc372618159e5c95665b827936280572b61.tar.gz |
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>
-rwxr-xr-x | ctdb/config/ctdb.init | 17 | ||||
-rw-r--r-- | packaging/systemd/ctdb.service.in | 4 |
2 files changed, 9 insertions, 12 deletions
diff --git a/ctdb/config/ctdb.init b/ctdb/config/ctdb.init index 7fe8f0085ae..6a7f7812394 100755 --- a/ctdb/config/ctdb.init +++ b/ctdb/config/ctdb.init @@ -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 diff --git a/packaging/systemd/ctdb.service.in b/packaging/systemd/ctdb.service.in index 4494f914cff..7905a93e242 100644 --- a/packaging/systemd/ctdb.service.in +++ b/packaging/systemd/ctdb.service.in @@ -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 |