From becab4a7f62980abcf124ffc43f39fd4024dfa29 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Mon, 16 May 2011 11:26:59 +0000
Subject: [PATCH] Fix for OPENDJ-148 : pfexec /usr/opendj/configure does not execute (permission denied). pfexec checks file permissions before the profile and exec attributes on OpenIndiana (and OpenSolaris). So now configure and unconfigure are executable by all, but check for root id, allowing use with pfexec.

---
 opendj-sdk/opends/resource/configure |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/resource/configure b/opendj-sdk/opends/resource/configure
index cdccedd..3ce1152 100755
--- a/opendj-sdk/opends/resource/configure
+++ b/opendj-sdk/opends/resource/configure
@@ -41,6 +41,14 @@
 SCRIPT_NAME=configure
 export SCRIPT_NAME
 
+# Check if running as root. This is required to be able to copy files and
+# enable SMF
+if [[ `id -u` -ne 0 ]]
+then
+  echo "This script must be run as root" 1>&2
+  exit 1
+fi
+
 cd "${WORKING_DIR}"
 
 # Set environment variables

--
Gitblit v1.10.0