[shibboleth-sp2] 41/119: Backport shibd script changes.

Ferenc Wágner wferi-guest at moszumanska.debian.org
Tue Jan 26 21:29:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

wferi-guest pushed a commit to annotated tag 1.3.1
in repository shibboleth-sp2.

commit 841a4d1e4021532897d4427992515901a66a6cbb
Author: Scott Cantor <cantor.2 at osu.edu>
Date:   Tue Aug 14 19:22:30 2007 +0000

    Backport shibd script changes.
---
 configs/Makefile.am                   | 16 ++++---
 configs/shibd-debian.in               | 84 +++++++++++++++++++++++++++++++++++
 configs/{shibd.in => shibd-redhat.in} |  2 +-
 shibboleth.spec.in                    |  5 ++-
 4 files changed, 99 insertions(+), 8 deletions(-)

diff --git a/configs/Makefile.am b/configs/Makefile.am
index 89c8fc4..f17341a 100644
--- a/configs/Makefile.am
+++ b/configs/Makefile.am
@@ -8,7 +8,8 @@ pkgxmldir = $(datadir)/xml/@PACKAGE@
 varrundir = $(localstatedir)/run
 pkgsysconfdir = $(sysconfdir)/@PACKAGE@
 pkgsysconf_DATA = \
-	shibd \
+	shibd-redhat \
+	shibd-debian \
 	apache.config \
 	apache2.config \
 	apache22.config
@@ -61,7 +62,10 @@ apache2.config: ${srcdir}/apache2.config.in Makefile ${top_builddir}/config.stat
 apache22.config: ${srcdir}/apache22.config.in Makefile ${top_builddir}/config.status
 	$(MAKE) do-build-file FILE=$@
 
-shibd: ${srcdir}/shibd.in Makefile ${top_builddir}/config.status
+shibd-redhat: ${srcdir}/shibd-redhat.in Makefile ${top_builddir}/config.status
+	$(MAKE) do-build-file FILE=$@
+
+shibd-debian: ${srcdir}/shibd-debian.in Makefile ${top_builddir}/config.status
 	$(MAKE) do-build-file FILE=$@
 
 shibd.logger: ${srcdir}/shibd.logger.in Makefile ${top_builddir}/config.status
@@ -105,21 +109,23 @@ CLEANFILES = \
 	apache.config \
 	apache2.config \
 	apache22.config \
-	shibd \
+	shibd-redhat \
+	shibd-debian \
 	shibd.logger \
 	native.logger \
 	shibboleth.xml \
 	AAP.xml \
 	example-metadata.xml
 
-EXTRA_DIST = .cvsignore \
+EXTRA_DIST = \
 	shibboleth.xml.in \
 	native.logger.in \
 	shibd.logger.in \
 	apache.config.in \
 	apache2.config.in \
 	apache22.config.in \
-	shibd.in \
+	shibd-redhat.in \
+	shibd-debian.in \
 	shibboleth.logger \
 	accessError.html \
 	rmError.html \
diff --git a/configs/shibd-debian.in b/configs/shibd-debian.in
new file mode 100644
index 0000000..59fd66d
--- /dev/null
+++ b/configs/shibd-debian.in
@@ -0,0 +1,84 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: shibd
+# Required-Start: $local_fs $remote_fs $network
+# Required-Stop: $local_fs $remote_fs $network
+# Default-Start: 2 3 4 5
+# Default-Stop: S 0 1 6
+# Short-Description: Shibboleth 1.3 Service Provider Daemon
+# Description: Starts the separate daemon used by the Shibboleth
+# Apache module to manage sessions and to retrieve
+# attributes from Shibboleth Identity Providers.
+### END INIT INFO
+#
+# Written by Quanah Gibson-Mount <quanah at stanford.edu>
+# Modified by Lukas Haemmerle <lukas.haemmerle at switch.ch> for Shibboleth 2
+# Based on the dh-make template written by:
+#
+# Written by Miquel van Smoorenburg <miquels at cistron.nl>.
+# Modified for Debian
+# by Ian Murdock <imurdock at gnu.ai.mit.edu>.
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DESC="Shibboleth 1.3 daemon"
+NAME=shibd
+SHIB_HOME=@-PREFIX-@
+SHIB_CONFIG=@-PKGSYSCONFDIR-@/shibboleth.xml
+LD_LIBRARY_PATH=@-PREFIX-@/lib
+DAEMON=@-PREFIX-@/sbin/$NAME
+SCRIPTNAME=/etc/init.d/$NAME
+PIDFILE=/var/run/$NAME.pid
+DAEMON_OPTS=""
+
+# Force removal of socket
+DAEMON_OPTS="$DAEMON_OPTS -f"
+
+# Use defined configuration file
+DAEMON_OPTS="$DAEMON_OPTS -c $SHIB_CONFIG"
+
+# Specify pid file to use
+DAEMON_OPTS="$DAEMON_OPTS -p $PIDFILE"
+
+# Exit if the package is not installed.
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration if it is present.
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Get the setting of VERBOSE and other rcS variables.
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+case "$1" in
+start)
+    # Don't start shibd if NO_START is set.
+    if [ "$NO_START" = 1 ] ; then
+        echo "Not starting $DESC (see /etc/default/$NAME)"
+        exit 0
+    fi
+    echo -n "Starting $DESC: "
+    start-stop-daemon --background --start --quiet \
+        --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
+    echo "$NAME."
+    ;;
+stop)
+    echo -n "Stopping $DESC: "
+    start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+        --exec $DAEMON
+    echo "$NAME."
+    ;;
+restart|force-reload)
+    echo -n "Restarting $DESC: "
+    start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+        --exec $DAEMON
+    sleep 1
+    start-stop-daemon --background --start --quiet \
+        --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
+    echo "$NAME."
+    ;;
+*)
+    echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/configs/shibd.in b/configs/shibd-redhat.in
similarity index 96%
rename from configs/shibd.in
rename to configs/shibd-redhat.in
index 059e3d5..8c2447e 100644
--- a/configs/shibd.in
+++ b/configs/shibd-redhat.in
@@ -3,7 +3,7 @@
 # Startup script for the Shibboleth Service Provider Daemon
 #
 # chkconfig: - 98 02
-# description: Shibboleth Service Provider Daemon
+# description: Shibboleth 1.3 Service Provider Daemon
 # processname: shibd
 # pidfile: @-VARRUNDIR-@/shibd.pid
 # config: @-PKGSYSCONFDIR-@/shibboleth.xml
diff --git a/shibboleth.spec.in b/shibboleth.spec.in
index 77a90c7..39e4f08 100644
--- a/shibboleth.spec.in
+++ b/shibboleth.spec.in
@@ -141,7 +141,7 @@ fi
 %if "%{_vendor}" == "redhat"
 	if [ -d %{_sysconfdir}/init.d ] ; then
 		if [ ! -f %{_sysconfdir}/init.d/shibd ] ; then
-			cp -p %{_sysconfdir}/shibboleth/shibd %{_sysconfdir}/init.d/shibd
+			cp -p %{_sysconfdir}/shibboleth/%{_vendor} %{_sysconfdir}/init.d/shibd
 			chmod 755 %{_sysconfdir}/init.d/shibd
 			chkconfig --add shibd
 		fi
@@ -195,7 +195,8 @@ restorecon %{_sbindir}/shibd
 %config %{_sysconfdir}/shibboleth/sp-example.key
 %{_sysconfdir}/shibboleth/*.dist
 %{_sysconfdir}/shibboleth/apache*.config
-%{_sysconfdir}/shibboleth/shibd
+%{_sysconfdir}/%{name}/shibd-redhat
+%{_sysconfdir}/%{name}/shibd-debian
 
 %exclude %{_bindir}/posttest
 %exclude %{_bindir}/test-client

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git



More information about the Pkg-shibboleth-devel mailing list