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:
parent
aca5972233
commit
a1e78cc372
@ -55,7 +55,7 @@ detect_init_style
|
|||||||
export CTDB_INIT_STYLE
|
export CTDB_INIT_STYLE
|
||||||
|
|
||||||
ctdbd="${CTDBD:-/usr/sbin/ctdbd}"
|
ctdbd="${CTDBD:-/usr/sbin/ctdbd}"
|
||||||
ctdbd_wrapper="${CTDBD_WRAPPER:-/usr/sbin/ctdbd_wrapper}"
|
ctdb="${CTDB:-/usr/bin/ctdb}"
|
||||||
pidfile="/var/run/ctdb/ctdbd.pid"
|
pidfile="/var/run/ctdb/ctdbd.pid"
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
@ -66,21 +66,18 @@ start()
|
|||||||
|
|
||||||
case "$CTDB_INIT_STYLE" in
|
case "$CTDB_INIT_STYLE" in
|
||||||
suse)
|
suse)
|
||||||
startproc \
|
startproc "$ctdbd"
|
||||||
"$ctdbd_wrapper" "start"
|
|
||||||
rc_status -v
|
rc_status -v
|
||||||
;;
|
;;
|
||||||
redhat)
|
redhat)
|
||||||
daemon --pidfile "$pidfile" \
|
daemon --pidfile "$pidfile" "$ctdbd"
|
||||||
"$ctdbd_wrapper" "start"
|
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
echo
|
echo
|
||||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ctdb || RETVAL=1
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ctdb || RETVAL=1
|
||||||
return $RETVAL
|
return $RETVAL
|
||||||
;;
|
;;
|
||||||
debian)
|
debian)
|
||||||
eval start-stop-daemon --start --quiet --background --exec \
|
eval start-stop-daemon --start --quiet --background --exec "$ctdbd"
|
||||||
"$ctdbd_wrapper" "start"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -91,11 +88,11 @@ stop()
|
|||||||
|
|
||||||
case "$CTDB_INIT_STYLE" in
|
case "$CTDB_INIT_STYLE" in
|
||||||
suse)
|
suse)
|
||||||
"$ctdbd_wrapper" "stop"
|
"$ctdb" "shutdown"
|
||||||
rc_status -v
|
rc_status -v
|
||||||
;;
|
;;
|
||||||
redhat)
|
redhat)
|
||||||
"$ctdbd_wrapper" "stop"
|
"$ctdb" "shutdown"
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
# Common idiom in Red Hat init scripts - success() always
|
# Common idiom in Red Hat init scripts - success() always
|
||||||
# succeeds so this does behave like if-then-else
|
# succeeds so this does behave like if-then-else
|
||||||
@ -106,7 +103,7 @@ stop()
|
|||||||
return $RETVAL
|
return $RETVAL
|
||||||
;;
|
;;
|
||||||
debian)
|
debian)
|
||||||
"$ctdbd_wrapper" "stop"
|
"$ctdb" "shutdown"
|
||||||
log_end_msg $?
|
log_end_msg $?
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -10,8 +10,8 @@ LimitCORE=infinity
|
|||||||
LimitNOFILE=1048576
|
LimitNOFILE=1048576
|
||||||
TasksMax=4096
|
TasksMax=4096
|
||||||
PIDFile=@CTDB_RUNDIR@/ctdbd.pid
|
PIDFile=@CTDB_RUNDIR@/ctdbd.pid
|
||||||
ExecStart=@SBINDIR@/ctdbd_wrapper start
|
ExecStart=@SBINDIR@/ctdbd
|
||||||
ExecStop=@SBINDIR@/ctdbd_wrapper stop
|
ExecStop=@BINDIR@/ctdb shutdown
|
||||||
KillMode=control-group
|
KillMode=control-group
|
||||||
Restart=no
|
Restart=no
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user