From 5eea85798a7476a490262164c65fb5836d275165 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Wed, 03 Dec 2008 14:37:50 +0000
Subject: [PATCH] Provide suppport for SMF for the SVR4 packages. A SMF manifest is delivered in /usr/opends/resources/opends-manifest.xml The manifest is edited and copied under /var/svc/manifest/network/ldap by the configure command (will be committed later), and imported via svccfg. start-ds / stop-ds / control-panel can be used to start /stop the server. They temporarily enable/disable the opends service. Use svcadm enable opends to permanently enable OpenDS to start at boot time.
---
opends/resource/bin/start-ds | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/opends/resource/bin/start-ds b/opends/resource/bin/start-ds
index ffbfe97..fe0386e 100755
--- a/opends/resource/bin/start-ds
+++ b/opends/resource/bin/start-ds
@@ -45,6 +45,26 @@
SCRIPT_NAME="start-ds"
export SCRIPT_NAME
+# check for presence of lib/_svc-opends.sh file
+# If present, we should be on Solaris/OpenSolaris and use SMF to start
+# OpenDS.
+# Check --exec. If not present, start OpenDS from SMF
+
+if test -f "${INSTALL_ROOT}/lib/_svc-opends.sh"
+then
+ if [ "$1" == "--exec" ]
+ then
+ shift
+ elif [ -z "$1" -o "$1" == "-L" -o "$1" == "-Q" -o "$1" == "-N" -o \
+ "$1" == "--nodetach" -o "$1" == "-useLastKnownGoodConfig" \
+ -o "$1" == "--quiet" ]
+ then
+# these options are only used when trying to start the server
+# In this case, start it through the service.
+ exec /usr/sbin/svcadm enable -t svc:/network/ldap/server:opends
+ fi
+fi
+
# Set environment variables
SCRIPT_UTIL_CMD=set-full-environment-and-test-java
export SCRIPT_UTIL_CMD
--
Gitblit v1.10.0