From dc7a7d694909bbb2808a198f1b1e19fe12f78fc1 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Thu, 23 Feb 2017 08:20:49 -0500 Subject: build: fixes to build 3.9.0rc2 on Debian Add glustereventsd-Debian(.in) and associated Makefile(.am) and configure(.ac) changes Add UUIDLIBS to fdl's librecon Change-Id: Ibff821691023704978140eaaff2c6532b74c50fa BUG: 1426222 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: https://review.gluster.org/16735 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Joe Julian Reviewed-by: Shyamsundar Ranganathan CentOS-regression: Gluster Build System --- .gitignore | 1 + configure.ac | 1 + extras/init.d/Makefile.am | 2 +- extras/init.d/glustereventsd-Debian.in | 91 ++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 extras/init.d/glustereventsd-Debian.in diff --git a/.gitignore b/.gitignore index 7c32e956453..cb10df35217 100644 --- a/.gitignore +++ b/.gitignore @@ -113,5 +113,6 @@ events/src/eventsapiconf.py extras/systemd/glustereventsd.service events/src/eventtypes.py libglusterfs/src/eventtypes.h +extras/init.d/glustereventsd-Debian extras/init.d/glustereventsd-FreeBSD extras/init.d/glustereventsd-Redhat diff --git a/configure.ac b/configure.ac index c2a7000b7bf..ee15d0ae489 100644 --- a/configure.ac +++ b/configure.ac @@ -197,6 +197,7 @@ AC_CONFIG_FILES([Makefile extras/init.d/glusterd-Redhat extras/init.d/glusterd-FreeBSD extras/init.d/glusterd-SuSE + extras/init.d/glustereventsd-Debian extras/init.d/glustereventsd-Redhat extras/init.d/glustereventsd-FreeBSD extras/ganesha/Makefile diff --git a/extras/init.d/Makefile.am b/extras/init.d/Makefile.am index bd8837bd9f7..a9ac3b42d84 100644 --- a/extras/init.d/Makefile.am +++ b/extras/init.d/Makefile.am @@ -1,7 +1,7 @@ EXTRA_DIST = glusterd-Debian glusterd-FreeBSD glusterd-Redhat glusterd-SuSE \ glusterd.plist rhel5-load-fuse.modules \ - glustereventsd-FreeBSD glustereventsd-Redhat + glustereventsd-FreeBSD glustereventsd-Redhat glustereventsd-Debian CLEANFILES = diff --git a/extras/init.d/glustereventsd-Debian.in b/extras/init.d/glustereventsd-Debian.in new file mode 100644 index 00000000000..6eebdb2b8d8 --- /dev/null +++ b/extras/init.d/glustereventsd-Debian.in @@ -0,0 +1,91 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: glustereventsd +# Required-Start: $local_fs $network +# Required-Stop: $local_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Gluster Events Server +# Description: Gluster Events Server +### END INIT INFO + +# Author: Chris AtLee +# Patched by: Matthias Albert < matthias@linux4experts.de> + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +NAME=glustereventsd +SCRIPTNAME=/etc/init.d/$NAME +DAEMON=@prefix@/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +GLUSTEREVENTSD_OPTS="" +PID=`test -f $PIDFILE && cat $PIDFILE` + + +# Gracefully exit if the package has been removed. +test -x $DAEMON || exit 0 + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +. /lib/lsb/init-functions + + +do_start() +{ + pidofproc -p $PIDFILE $DAEMON >/dev/null + status=$? + if [ $status -eq 0 ]; then + log_success_msg "glustereventsd service is already running with pid $PID" + else + log_daemon_msg "Starting glustereventsd service" "glustereventsd" + 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 $? + 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 $? +} + +do_status() +{ + pidofproc -p $PIDFILE $DAEMON >/dev/null + status=$? + if [ $status -eq 0 ]; then + log_success_msg "glustereventsd service is running with pid $PID" + else + log_failure_msg "glustereventsd service is not running." + fi + exit $status +} + +case "$1" in + start) + do_start + ;; + stop) + do_stop + ;; + status) + do_status; + ;; + restart|force-reload) + do_stop + sleep 2 + do_start + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + -- cgit