mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Chris Ridd
27.14.2012 1ed2959463617c84543e062ef3acff395efb02ea
Update SVR4 packaging for Solaris 11

Patch from Willi Burmeister <wib@qrv.uni-kiel.de>

Tested on Solaris 11 and OpenIndiana.
2 files modified
22 ■■■■ changed files
opends/resource/configure 17 ●●●● patch | view | raw | blame | history
opends/resource/unconfigure 5 ●●●●● patch | view | raw | blame | history
opends/resource/configure
@@ -41,6 +41,17 @@
SCRIPT_NAME=configure
export SCRIPT_NAME
case `uname -r` in
  *10)
       MANIFEST=/var/svc/manifest/network/ldap/opendj-manifest.xml
       IMPORTSVC="/usr/sbin/svccfg import $MANIFEST"
       ;;
  *11)
       MANIFEST=/lib/svc/manifest/network/ldap/opendj-manifest.xml
       IMPORTSVC="/usr/sbin/svcadm restart svc:/system/manifest-import:default"
       ;;
esac
# Check if running as root. This is required to be able to copy files and
# enable SMF
if [[ `id -u` -ne 0 ]]
@@ -90,13 +101,13 @@
    IFS=${CURRENT_IFS}
    if test "${USERNAME}" = "ldap" -a "$GROUPNAME" = "ldap"
    then
        cp ${INSTALL_ROOT}/resources/opendj-manifest.xml /var/svc/manifest/network/ldap/
        cp ${INSTALL_ROOT}/resources/opendj-manifest.xml $MANIFEST
    else
        cat ${INSTALL_ROOT}/resources/opendj-manifest.xml | sed -e "s/user='ldap/user='${USERNAME}/;s/group='ldap/group='${GROUPNAME}/" > /tmp/opendj-manifest.$$
        cp /tmp/opendj-manifest.$$ /var/svc/manifest/network/ldap/opendj-manifest.xml
        cp /tmp/opendj-manifest.$$ $MANIFEST
        rm /tmp/opendj-manifest.$$
    fi
    /usr/sbin/svccfg import /var/svc/manifest/network/ldap/opendj-manifest.xml
    $IMPORTSVC
  fi
  exit ${RETURN_CODE}
fi
opends/resource/unconfigure
@@ -106,12 +106,17 @@
fi
echo "Disabling SMF service ..."
if [ `uname -r` = "5.10" ]; then
# Now update SMF manifest, delete it and remove the file from  /var/svc/manifest
echo select network/ldap/server >  /tmp/opendj-unconfigure.$$
echo delete opendj >> /tmp/opendj-unconfigure.$$
/usr/sbin/svccfg -f /tmp/opendj-unconfigure.$$
rm /tmp/opendj-unconfigure.$$
rm /var/svc/manifest/network/ldap/opendj-manifest.xml
else
  rm /lib/svc/manifest/network/ldap/opendj-manifest.xml
  /usr/sbin/svcadm restart svc:/system/manifest-import:default
fi
echo "Resetting instance location ..."
# Launch the unconfigure process.