From 811a9e2b714935e22dff5f6c36a891961aaeccfa Mon Sep 17 00:00:00 2001
From: chebrard <chebrard@localhost>
Date: Mon, 26 Jan 2009 15:54:02 +0000
Subject: [PATCH] Frontport of all fixes related to SVR4 from branch 1.2 to trunk:

---
 opendj-sdk/opends/resource/bin/stop-ds |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/resource/bin/stop-ds b/opendj-sdk/opends/resource/bin/stop-ds
index 82bf934..f22ffe0 100755
--- a/opendj-sdk/opends/resource/bin/stop-ds
+++ b/opendj-sdk/opends/resource/bin/stop-ds
@@ -23,7 +23,7 @@
 # CDDL HEADER END
 #
 #
-#      Copyright 2006-2008 Sun Microsystems, Inc.
+#      Copyright 2006-2009 Sun Microsystems, Inc.
 
 
 # This script may be used to request that the Directory Server shut down.
@@ -72,7 +72,18 @@
         "$1" != "-H" -a "$1" != "--help" ]
 #These options are not stopping the server, but checking version and help
     then
-        exec /usr/sbin/svcadm disable -t svc:/network/ldap/server:opends
+        if [ "$1" = "-R" -o "$1" = "--restart" ]
+        then
+            /usr/sbin/svcadm disable -t svc:/network/ldap/server:opends
+            RETURN_CODE=$?
+            if test ${RETURN_CODE} -ne 0
+            then
+                exit ${RETURN_CODE}
+            fi
+            exec /usr/sbin/svcadm enable -t svc:/network/ldap/server:opends
+        else
+            exec /usr/sbin/svcadm disable -t svc:/network/ldap/server:opends
+        fi
     fi
 fi
 

--
Gitblit v1.10.0