6331N/APATH=/usr/xpg4/bin:/usr/bin:/usr/sbin:/sbin
6331N/Aexport PATH
6331N/A
6331N/AETCDIR=${PKG_INSTALL_ROOT}/etc
6331N/A
6331N/AOSREL=`uname -r`
6331N/AMAJOR=`echo $OSREL | cut -f1 -d.`
6331N/AMINOR=`echo $OSREL | cut -f2 -d.`
6331N/A
6331N/Aif [ \( ${MAJOR} -lt 5 \) -o \( ${MAJOR} -eq 5 -a ${MINOR} -lt 10 \) ] ; then
6331N/A echo "This package is intended for Solaris 10 and better"
6331N/A echo "as well as OpenSolaris/Illumos derived distributions, only!"
6331N/A echo
6331N/A echo "Either upgarde your ancient OS or use the OpenDJ generic zip package."
6331N/A exit 3
6331N/Afi
6331N/A
6331N/A# check, whether the group ldapd exists
6331N/Aegrep -s '^ldapd:' ${ETCDIR}/group
6331N/Aif [ $? -ne 0 ]; then
6331N/Aecho "
6331N/AWARNING:
6331N/A For security reason OpenDJ should be run as user with the group 'ldapd'.
6331N/A This group is not part of your ${ETCDIR}/group ! Please setup
6331N/A such an group! E.g. using:
6331N/A
6331N/A groupadd -g 109 ldapd
6331N/A"
6331N/A BREAK="true"
6331N/Afi
6331N/A
6331N/A# check, whether a user ldapd exists
6331N/Aegrep -s '^ldapd:' ${ETCDIR}/passwd
6331N/Aif [ $? -ne 0 ]; then
6331N/Aecho "
6331N/AWARNING:
6331N/A For security reason OpenDJ should be run as user 'ldapd'.
6331N/A This user is not part of your ${ETCDIR}/passwd ! Please setup
6331N/A such an account! E.g.:
6331N/A
6331N/A useradd -c 'OpenDJ LDAP Server' -d /var/share/ldap/opendj \\
6331N/A -u 109 -g ldapd -s /bin/true ldapd
6331N/A"
6331N/A BREAK="true"
6331N/Afi
6331N/A
6331N/A# scripts need ksh93
6331N/Aif [ ! -x ${PKG_INSTALL_ROOT}/bin/ksh93 ]; then
6331N/A echo "
6331N/AERROR:
6331N/A This package requires the AT&T Korn-Shell 93!
6331N/A In case you don't have a package, you can download a S10+ compatible
6331N/A version via http://dev.iws.cs.uni-magdeburg.de/lnf/i386/5.11/LNFksh93.pkg.gz
6331N/A"
6331N/A BREAK="true"
6331N/Afi
6331N/Aif [ "$BREAK" = "true" ]; then
6331N/A exit 3
6331N/Afi
6331N/A
6331N/Aif [ ! -d ${PKG_INSTALL_ROOT}/lib/svc/manifest ]; then
6331N/A # S10
6331N/A echo "SVCDIR=var" >>$1
6331N/Aelse
6331N/A echo "SVCDIR=lib" >>$1
6331N/Afi
6331N/Aif [ ! -d ${PKG_INSTALL_ROOT}/etc/security/exec_attr.d ]; then
6331N/A # old RBAC
6331N/A echo "CLASSES=$CLASSES rbac" >>$1
6331N/Aelse
6331N/A echo "CLASSES=$CLASSES rbac2" >>$1
6331N/Afi
6331N/A
6331N/Aexit 0