--- a/extras/init.d/glusterd-Debian.in 2020-04-01 19:21:55.851345521 +0300 +++ b/extras/init.d/glusterd-Debian.in 2020-04-01 19:35:59.948381224 +0300 @@ -28,8 +28,8 @@ . /lib/init/vars.sh # Define LSB log_* functions. -. /lib/lsb/init-functions - +#. /lib/lsb/init-functions +. /etc/rc.d/init.d/functions do_start() { @@ -38,22 +38,17 @@ if [ $status -eq 0 ]; then log_success_msg "glusterd service is already running with pid $PID" else - log_daemon_msg "Starting glusterd service" "glusterd" + boot_mesg "Starting glusterd service" start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -p $PIDFILE $GLUSTERD_OPTS - log_end_msg $? - start_daemon -p $PIDFILE $DAEMON -f $CONFIGFILE - return $? + evaluate_retval fi } do_stop() { - log_daemon_msg "Stopping glusterd service" "glusterd" - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE - log_end_msg $? - rm -f $PIDFILE - killproc -p $PIDFILE $DAEMON - return $? + boot_mesg "Stopping glusterd service" + start-stop-daemon --stop --quiet --oknodo --remove-pidfile --pidfile $PIDFILE + evaluate_retval } do_status() @@ -61,9 +56,9 @@ pidofproc -p $PIDFILE $DAEMON >/dev/null status=$? if [ $status -eq 0 ]; then - log_success_msg "glusterd service is running with pid $PID" + echo -e "glusterd service is running with pid $PID" else - log_failure_msg "glusterd service is not running." + echo -e "glusterd service is not running." fi exit $status } --- a/extras/init.d/glustereventsd-Debian.in 2020-04-01 19:22:45.069347603 +0300 +++ b/extras/init.d/glustereventsd-Debian.in 2020-04-01 22:12:42.295778909 +0300 @@ -28,8 +28,8 @@ . /lib/init/vars.sh # Define LSB log_* functions. -. /lib/lsb/init-functions - +#. /lib/lsb/init-functions +. /etc/rc.d/init.d/functions do_start() { @@ -38,22 +38,17 @@ if [ $status -eq 0 ]; then log_success_msg "glustereventsd service is already running with pid $PID" else - log_daemon_msg "Starting glustereventsd service" "glustereventsd" + boot_mesg "Starting glustereventsd service" start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -p $PIDFILE $GLUSTEREVENTSD_OPTS - log_end_msg $? - start_daemon -p $PIDFILE $DAEMON -f $CONFIGFILE - return $? + evaluate_retval fi } do_stop() { - log_daemon_msg "Stopping glustereventsd service" "glustereventsd" - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE - log_end_msg $? - rm -f $PIDFILE - killproc -p $PIDFILE $DAEMON - return $? + boot_mesg "Stopping glustereventsd service" + start-stop-daemon --stop --quiet --oknodo --remove-pidfile --pidfile $PIDFILE + evaluate_retval } do_status() @@ -61,9 +56,9 @@ pidofproc -p $PIDFILE $DAEMON >/dev/null status=$? if [ $status -eq 0 ]; then - log_success_msg "glustereventsd service is running with pid $PID" + echo -e "glustereventsd service is running with pid $PID" else - log_failure_msg "glustereventsd service is not running." + echo -e "glustereventsd service is not running." fi exit $status }