Author: rmeggins
Update of /cvs/dirsec/dsgw
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30404/dsgw
Modified Files:
Makefile.am configure.ac setup-ds-dsgw.in aclocal.m4 configure
missing install-sh depcomp config.sub config.guess compile
Makefile.in
Log Message:
setup will print messages showing what it is doing - setup will copy in the admin server
home page html fragment files to enable using dsgw, phonebook, and orgchart from the admin
server home page
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/dsgw/Makefile.am,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Makefile.am 1 Feb 2008 00:03:36 -0000 1.16
+++ Makefile.am 1 Feb 2008 16:50:12 -0000 1.17
@@ -26,6 +26,8 @@
htmldir = $(datadir)@htmldir@
pbhtmldir = $(datadir)@pbhtmldir@
orghtmldir = $(datadir)@orghtmldir@
+admservdata = $(datadir)@admservdata@
+admservhtml = $(datadir)@admservhtml@
# config is a bit of a misnomer - these are really configurable templates
configdir = $(datadir)@configdir@
pbconfigdir = $(datadir)@pbconfigdir@
@@ -294,6 +296,8 @@
-e 's,@localstatedir\@,$(localstatedir),g' \
-e 's,@cgibindir\@,$(cgibindir),g' \
-e 's,@cgiuri\@,$(cgiuri),g' \
+ -e 's,@admservdata\@,$(admservdata),g' \
+ -e 's,@admservhtml\@,$(admservhtml),g' \
-e 's,@orguri\@,@orguri@,g' \
-e 's,@dsgwuri\@,@dsgwuri@,g' \
-e 's,@pburi\@,@pburi@,g' \
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/dsgw/configure.ac,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- configure.ac 31 Jan 2008 03:14:44 -0000 1.9
+++ configure.ac 1 Feb 2008 16:50:12 -0000 1.10
@@ -254,6 +254,8 @@
orghtmldir=/dsgw/orghtml
configdir=/dsgw/config
pbconfigdir=/dsgw/pbconfig
+ admservdata=/data
+ admservhtml=/html
# root directory for all manuals
manualdir=/manual
# the actual manual files are installed here under the lang directory
@@ -270,6 +272,8 @@
orghtmldir=/$PACKAGE_BASE_NAME/dsgw/orghtml
configdir=/$PACKAGE_BASE_NAME/dsgw/config
pbconfigdir=/$PACKAGE_BASE_NAME/dsgw/pbconfig
+ admservdata=/$PACKAGE_BASE_NAME/data
+ admservhtml=/$PACKAGE_BASE_NAME/html
# root directory for all manuals
manualdir=/$PACKAGE_BASE_NAME/manual
# the actual manual files are installed here under the lang directory
@@ -341,6 +345,8 @@
AC_SUBST(perldir)
AC_SUBST(manualdir)
AC_SUBST(manualsubdir)
+AC_SUBST(admservdata)
+AC_SUBST(admservhtml)
# need a check here to see if the ldif functions are exported from libldap
# for now, just assume they are not
Index: setup-ds-dsgw.in
===================================================================
RCS file: /cvs/dirsec/dsgw/setup-ds-dsgw.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- setup-ds-dsgw.in 31 Jan 2008 23:51:47 -0000 1.4
+++ setup-ds-dsgw.in 1 Feb 2008 16:50:12 -0000 1.5
@@ -30,6 +30,12 @@
#
##########################
+echo '######################################################################'
+echo This shell script will configure the Directory Server
+echo Gateway, Phonebook and Org Chart web applications to
+echo work with the Administration Server.
+echo
+
getValFromInf() {
cattr=$1
cfile=$2
@@ -63,6 +69,7 @@
# see if there is a $dsgwconfigdir/../admin-serv
admservdir=$basecfgdir/admin-serv
if [ -f "$admservdir/local.conf" ] ; then
+ echo Reading parameters from Administration Server config . . .
host=`getValFromLdif serverHostName "$admservdir/local.conf"`
port=`getValFromLdif configuration.nsServerPort "$admservdir/local.conf"`
sec=`getValFromLdif configuration.nsServerSecurity
"$admservdir/local.conf"`
@@ -78,6 +85,7 @@
httpdconf=$admservdir/httpd.conf
dsgwuser=`ls -l $admservdir/local.conf | awk '{print $3}'`
dsgwgroup=`ls -l $admservdir/local.conf | awk '{print $4}'`
+ echo Using Administration Server URL $httpurl . . .
fi
# see if there are any directory servers here
@@ -86,6 +94,7 @@
*.deleted) continue ;;
esac
if [ -d "$dir" -a -f "$dir/dse.ldif" ] ; then
+ echo Reading parameters from Directory Server $dir . . .
dirmgr=`getValFromLdif nsslapd-rootdn "$dir/dse.ldif"`
host=`getValFromLdif nsslapd-localhost "$dir/dse.ldif"`
sec=`getValFromLdif nsslapd-security "$dir/dse.ldif"`
@@ -115,28 +124,23 @@
fi
done
+if [ -n "$ldapurl" ] ; then
+ echo Using Directory Server URL $ldapurl/$suffix . . .
+fi
+
# get command line arguments
-myargs=
-silent=
inffile=
-tmpinffile=
nextisinffile=
-keepinffile=
+reconfig=
for arg in "$@" ; do
- if [ "$arg" = "-s" ]; then
- silent=1
- elif [ "$arg" = "-k" ]; then
- keepinffile=1
- elif [ "$arg" = "-r" ]; then
+ if [ "$arg" = "-r" ]; then
reconfig=1
elif [ "$arg" = "-f" ]; then
nextisinffile=1
elif [ $nextisinffile ]; then
inffile="$arg"
nextisinffile=
- else
- myargs="$myargs $arg"
fi
done
@@ -162,9 +166,14 @@
if [ -n "$infgroup" ] ; then
dsgwgroup="$infgroup"
fi
+ echo Using parameters from file $inffile . . .
+ echo Using Administration Server URL $httpurl . . .
+ echo Using Directory Server URL $ldapurl/$suffix . . .
fi
if [ -z "$reconfig" -a -f $dsgwconfigdir/dsgw.conf ] ; then
+ echo
+ echo
'######################################################################'
echo The Directory Server Gateway has already been configured. The
echo file $dsgwconfigdir/dsgw.conf
echo exists already. If you want to force a reconfiguration, removing
@@ -173,6 +182,7 @@
exit 1
fi
+echo Generating config file $dsgwconfigdir/dsgw.conf . . .
# generate dsgw.conf and pb.conf and default.conf in the $dsgwconfigdir directory
rm -f $dsgwconfigdir/dsgw.conf
sed -e "s#@host@#$hostname#g" \
@@ -188,6 +198,7 @@
chown $dsgwuser:$dsgwgroup $dsgwconfigdir/dsgw.conf
chmod 0400 $dsgwconfigdir/dsgw.conf
+echo Generating config file $dsgwconfigdir/pb.conf . . .
rm -f $dsgwconfigdir/pb.conf
sed -e "s#@host@#$hostname#g" \
-e "s#@port@#$port#g" \
@@ -202,6 +213,7 @@
chown $dsgwuser:$dsgwgroup $dsgwconfigdir/pb.conf
chmod 0400 $dsgwconfigdir/pb.conf
+echo Generating config file $dsgwconfigdir/orgchart.conf . . .
rm -f $dsgwconfigdir/orgchart.conf
sed -e "s#@host@#$hostname#g" \
-e "s#@port@#$port#g" \
@@ -217,23 +229,52 @@
chmod 0400 $dsgwconfigdir/orgchart.conf
# the default.conf is just a copy of dsgw.conf
+echo Generating config file $dsgwconfigdir/default.conf . . .
rm -f $dsgwconfigdir/default.conf
cp $dsgwconfigdir/dsgw.conf $dsgwconfigdir/default.conf
chown $dsgwuser:$dsgwgroup $dsgwconfigdir/default.conf
chmod 0400 $dsgwconfigdir/default.conf
# tell Apache about the dsgw - must restart Apache
+echo Adding configuration to httpd config file $httpdconf . . .
grep dsgw-httpd.conf "$httpdconf" > /dev/null 2>&1 || (echo
"" ; echo "# DSGW configuration" ; echo "Include
$dsgwconfigdir/dsgw-httpd.conf") >> $httpdconf
-echo "The DSGW has been successfully configured."
-if [ $isAdmServ ] ; then
- echo "Please restart the Admin Server - /path/to/start-admin "
+# copy in the admin server web app fragments
+echo Enabling links to web apps from Administration Server home page . . .
+admservdata="@admservdata@"
+admservhtml="@admservhtml@"
+
+if [ -d "$admservdata" -a -d "$admservhtml" ] ; then
+ if [ ! -f "$admservdata/admserv_dsgw.html" ] ; then
+ echo Error: $admservdata/admserv_dsgw.html not found
+ elif [ ! -f "$admservhtml/admserv_dsgw.html" ] ; then
+ cp -p "$admservdata/admserv_dsgw.html" "$admservhtml"
+ else
+ echo $admservhtml/admserv_dsgw.html already exists - not copying . . .
+ fi
+
+ if [ ! -f "$admservdata/admserv_phonebook.html" ] ; then
+ echo Error: $admservdata/admserv_phonebook.html not found
+ elif [ ! -f "$admservhtml/admserv_phonebook.html" ] ; then
+ cp -p "$admservdata/admserv_phonebook.html" "$admservhtml"
+ else
+ echo $admservhtml/admserv_phonebook.html already exists - not copying . . .
+ fi
+
+ if [ ! -f "$admservdata/admserv_orgchart.html" ] ; then
+ echo Error: $admservdata/admserv_orgchart.html not found
+ elif [ ! -f "$admservhtml/admserv_orgchart.html" ] ; then
+ cp -p "$admservdata/admserv_orgchart.html" "$admservhtml"
+ else
+ echo $admservhtml/admserv_orgchart.html already exists - not copying . . .
+ fi
else
- echo "Please restart Apache e.g."
- echo " service httpd restart"
- echo " OR"
- echo " apachectl restart"
- echo "or however you restart apache on this system."
+ echo Error: Administration server directories "$admservdata" and
"$admservhtml" not found
fi
+echo
+echo The Directory Server Gateway web applications have been successfully configured.
+echo You will need to restart your Administration Server.
+echo '######################################################################'
+
exit 0
Index: configure
===================================================================
RCS file: /cvs/dirsec/dsgw/configure,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- configure 1 Feb 2008 00:03:36 -0000 1.16
+++ configure 1 Feb 2008 16:50:12 -0000 1.17
@@ -466,7 +466,7 @@
#endif"
ac_default_prefix=/opt/dirsrv
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION
PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir
libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir
infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS
INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF
AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p
AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE
MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu
host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR
am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE
am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE
SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP!
P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS POW_LIB PACKAGE_BASE_NAME instconfigdir
BUNDLE_TRUE BUNDLE_FALSE DEBUG_TRUE DEBUG_FALSE LIBSOCKET LIBNSL LIBCSTD LIBCRUN perlexec
CXXLINK_REQUIRED_TRUE CXXLINK_REQUIRED_FALSE HPUX_TRUE HPUX_FALSE SOLARIS_TRUE
SOLARIS_FALSE PKG_CONFIG ICU_CONFIG nspr_inc nspr_lib nspr_libdir nss_inc nss_lib
nss_libdir sasl_inc sasl_lib sasl_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir
adminutil_inc adminutil_lib adminutil_libdir adminutil_ver icu_lib icu_libdir icu_inc
icu_bin cgibindir cgiuri dsgwuri orguri pburi propertydir htmldir pbhtmldir orghtmldir
configdir pbconfigdir contextdir securitydir cookiedir perldir manualdir manualsubdir
NEED_LDIF_TRUE NEED_LDIF_FALSE WINNT_TRUE WINNT_FALSE LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION
PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir
libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir
infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS
INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF
AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p
AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE
MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu
host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR
am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE
am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE
SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP!
P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS POW_LIB PACKAGE_BASE_NAME instconfigdir
BUNDLE_TRUE BUNDLE_FALSE DEBUG_TRUE DEBUG_FALSE LIBSOCKET LIBNSL LIBCSTD LIBCRUN perlexec
CXXLINK_REQUIRED_TRUE CXXLINK_REQUIRED_FALSE HPUX_TRUE HPUX_FALSE SOLARIS_TRUE
SOLARIS_FALSE PKG_CONFIG ICU_CONFIG nspr_inc nspr_lib nspr_libdir nss_inc nss_lib
nss_libdir sasl_inc sasl_lib sasl_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir
adminutil_inc adminutil_lib adminutil_libdir adminutil_ver icu_lib icu_libdir icu_inc
icu_bin cgibindir cgiuri dsgwuri orguri pburi propertydir htmldir pbhtmldir orghtmldir
configdir pbconfigdir contextdir securitydir cookiedir perldir manualdir manualsubdir
admservdata admservhtml NEED_LDIF_TRUE NEED_LDIF_FALSE WINNT_TRUE WINNT_FALSE
LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -21403,6 +21403,8 @@
orghtmldir=/dsgw/orghtml
configdir=/dsgw/config
pbconfigdir=/dsgw/pbconfig
+ admservdata=/data
+ admservhtml=/html
# root directory for all manuals
manualdir=/manual
# the actual manual files are installed here under the lang directory
@@ -21419,6 +21421,8 @@
orghtmldir=/$PACKAGE_BASE_NAME/dsgw/orghtml
configdir=/$PACKAGE_BASE_NAME/dsgw/config
pbconfigdir=/$PACKAGE_BASE_NAME/dsgw/pbconfig
+ admservdata=/$PACKAGE_BASE_NAME/data
+ admservhtml=/$PACKAGE_BASE_NAME/html
# root directory for all manuals
manualdir=/$PACKAGE_BASE_NAME/manual
# the actual manual files are installed here under the lang directory
@@ -22518,6 +22522,8 @@
+
+
# need a check here to see if the ldif functions are exported from libldap
# for now, just assume they are not
@@ -23406,6 +23412,8 @@
s,@perldir@,$perldir,;t t
s,@manualdir@,$manualdir,;t t
s,@manualsubdir@,$manualsubdir,;t t
+s,@admservdata@,$admservdata,;t t
+s,@admservhtml@,$admservhtml,;t t
s,@NEED_LDIF_TRUE@,$NEED_LDIF_TRUE,;t t
s,@NEED_LDIF_FALSE@,$NEED_LDIF_FALSE,;t t
s,@WINNT_TRUE@,$WINNT_TRUE,;t t
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/dsgw/Makefile.in,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Makefile.in 1 Feb 2008 00:03:36 -0000 1.17
+++ Makefile.in 1 Feb 2008 16:50:12 -0000 1.18
@@ -312,6 +312,8 @@
adminutil_lib = @adminutil_lib@
adminutil_libdir = @adminutil_libdir@
adminutil_ver = @adminutil_ver@
+admservdata = $(datadir)@admservdata@
+admservhtml = $(datadir)@admservhtml@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -575,6 +577,8 @@
-e 's,@localstatedir\@,$(localstatedir),g' \
-e 's,@cgibindir\@,$(cgibindir),g' \
-e 's,@cgiuri\@,$(cgiuri),g' \
+ -e 's,@admservdata\@,$(admservdata),g' \
+ -e 's,@admservhtml\@,$(admservhtml),g' \
-e 's,@orguri\@,@orguri@,g' \
-e 's,@dsgwuri\@,@dsgwuri@,g' \
-e 's,@pburi\@,@pburi@,g' \