Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 157057 Details for
Bug 244325
init script for the Admin Server
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
cvs diff configure.ac Makefile.am + new wrappers/initscript.in
init_script.diffs (text/plain), 9.77 KB, created by
Noriko Hosoi
on 2007-06-15 01:22:32 UTC
(
hide
)
Description:
cvs diff configure.ac Makefile.am + new wrappers/initscript.in
Filename:
MIME Type:
Creator:
Noriko Hosoi
Created:
2007-06-15 01:22:32 UTC
Size:
9.77 KB
patch
obsolete
>Index: configure.ac >=================================================================== >RCS file: /cvs/dirsec/adminserver/configure.ac,v >retrieving revision 1.5 >diff -t -w -U4 -r1.5 configure.ac >--- configure.ac 8 Jun 2007 22:49:18 -0000 1.5 >+++ configure.ac 15 Jun 2007 01:17:19 -0000 >@@ -79,8 +79,27 @@ > dnl as opposed to the default /usr/var > localstatedir='/var' > fi > >+shared_lib_suffix=.so >+initdir=/rc.d >+case $host in >+ *-*-linux*) >+ initdir=/rc.d/init.d >+ ;; >+ ia64-hp-hpux*) >+ ;; >+ hppa*-hp-hpux*) >+ shared_lib_suffix=.sl >+ ;; >+ sparc-sun-solaris*) >+ initdir=/init.d >+ ;; >+ *) >+esac >+AC_SUBST(initdir) >+AC_SUBST(shared_lib_suffix) >+ > # Check for web server > m4_include(m4/httpd.m4) > > # Check for library dependencies >@@ -145,8 +164,9 @@ > # relative to libdir > perldir=/$PACKAGE_BASE_NAME/perl > > # write out paths for binary components >+AC_SUBST(PACKAGE_NAME) > AC_SUBST(PACKAGE_BASE_NAME) > AC_SUBST(nspr_inc) > AC_SUBST(nspr_lib) > AC_SUBST(nspr_libdir) > >Index: Makefile.am >=================================================================== >RCS file: /cvs/dirsec/adminserver/Makefile.am,v >retrieving revision 1.8 >diff -t -w -U4 -r1.8 Makefile.am >--- Makefile.am 13 Jun 2007 17:48:34 -0000 1.8 >+++ Makefile.am 15 Jun 2007 01:17:19 -0000 >@@ -118,8 +118,10 @@ > @nss_lib@ -lsmime3 -lssl3 -lnss3 @nspr_lib@ -lnspr4 -lplc4 > > SETUPUTIL_LIBS = @setuputil_lib@ -ldsinstall > >+init_SCRIPTS = wrappers/$(PACKAGE_NAME) >+ > ldif_DATA = admserv/schema/ldif/00nsroot_backend.ldif.tmpl \ > admserv/schema/ldif/01nsroot.ldif.tmpl \ > admserv/schema/ldif/02globalpreferences.ldif.tmpl \ > admserv/schema/ldif/10dsdata.ldif.tmpl \ >@@ -127,9 +129,9 @@ > admserv/schema/ldif/20asdata.ldif.tmpl \ > admserv/schema/ldif/21astasks.ldif.tmpl \ > admserv/schema/ldif/22ascommands.ldif.tmpl > >-inf_DATA = admserv/newinst/src/admin.inf admserv/newinst/src/register_param.map >+inf_DATA = admserv/newinst/src/admin.inf admserv/newinst/src/register_param.map admserv/newinst/common/setup.inf > > cgibin_PROGRAMS = mergeConfig admpw security ugdsconfig ReadLog start_config_ds \ > config statpingserv viewdata dsconfig monreplication restartsrv \ > statusping viewlog htmladmin sec-activate stopsrv download help \ >@@ -356,10 +358,14 @@ > # ADMConfigDir = ${prefix}/etc/packagename > # i.e. it literally copies in '${prefix}' rather than expanding it out - we want this instead: > # ADMConfigDir = /etc/packagename > fixupcmd = sed \ >+ -e 's,@ECHO_C\@,$(ECHO_C),g' \ >+ -e 's,@ECHO_N\@,$(ECHO_N),g' \ > -e 's,@HTTPD\@,$(HTTPD),g' \ > -e 's,@bindir\@,$(bindir),g' \ >+ -e 's,@sbindir\@,$(sbindir),g' \ >+ -e 's,@localstatedir\@,$(localstatedir),g' \ > -e 's,@cgibindir\@,$(cgibindir),g' \ > -e 's,@cmdbindir\@,$(cmdbindir),g' \ > -e 's,@moddir\@,$(moddir),g' \ > -e 's,@modnssbindir\@,$(modnssbindir),g' \ >@@ -387,15 +393,18 @@ > -e 's,@instconfigdir\@,$(instconfigdir),g' \ > -e 's,@instancename\@,$(instancename),g' \ > -e 's,@BUILD_NUM\@,$(BUILDNUM),g' \ > -e 's,@NQBUILD_NUM\@,$(NQBUILDNUM),g' \ >+ -e 's,@package_name\@,$(PACKAGE_NAME),g' \ > -e 's,@PACKAGE_BASE_NAME\@,$(PACKAGE_BASE_NAME),g' \ > -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ > -e 's,@brand\@,$(brand),g' \ > -e 's,@capbrand\@,$(capbrand),g' \ > -e 's,@vendor\@,$(vendor),g' \ > -e 's,@helpdir\@,$(helpdir),g' \ > -e 's,@mimemagic\@,$(mimemagic),g' \ >+ -e 's,@initdir\@,$(initdir),g' \ >+ -e 's,@shared_lib_suffix\@,$(shared_lib_suffix),g' \ > -e 's,@perldir\@,$(perldir),g' > > # because the source may be either httpd.conf.in or httpd-2.2.conf.in > admserv/cfgstuff/httpd.conf: $(HTTPD_CONF_SRC) >@@ -404,4 +413,8 @@ > > % : %.in > if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi > $(fixupcmd) $< > $@ >+ >+%/$(PACKAGE_NAME): %/initscript.in >+ if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi >+ $(fixupcmd) $^ > $@ > >=================================================================== >wrappers/initscript.in >=================================================================== >#!/bin/sh ># ># @package_name@ This starts and stops @package_name@ ># ># chkconfig: - 21 79 ># description: @package_name@ Admin Server ># processname: @sbindir@/httpd ># piddir: @localstatedir@/run/@PACKAGE_BASE_NAME@ ># > ># Source function library. >if [ -f /etc/rc.d/init.d/functions ] ; then >. /etc/rc.d/init.d/functions >fi ># Source networking configuration. >if [ -f /etc/sysconfig/network ] ; then >. /etc/sysconfig/network >fi > ># Check that networking is up. >if [ "${NETWORKING}" = "no" ] >then > echo "Networking is down" > exit 0 >fi > ># Solaris echo cannot use -n - linux echo by default cannot use \c >echo_n() >{ > echo @ECHO_N@ "$*@ECHO_C@" >} > ># failure and success are not defined on some platforms >type failure > /dev/null 2>&1 || { >failure() >{ > echo_n " FAILED" >} >} > >type success > /dev/null 2>&1 || { >success() >{ > echo_n " SUCCESS" >} >} > ># On Solaris /var/run is in tmpfs and gets wiped out upon reboot ># we have to recreate the /var/run/@package_name@ directory ># We also have to make sure that the directory is writable ># by the directory server process ># the argument to this function is the server instance directory, ># which must have a dse.ldif file in it >fix_pid_dir_ownership() >{ > if [ -d $piddir ] ; then > owner=`grep \^sysuser @instconfigdir@/admin-serv/adm.conf | awk '{print $2}'` > dirowner=`ls -ld $piddir | awk '{print $3}'` > dirgrp=`ls -ld $piddir | awk '{print $4}'` > if [ "$owner" != "$dirowner" ]; then > groups $owner | grep $dirgrp > /dev/null 2>&1 > rc=$? > if [ $rc -eq 0 ]; then > chmod 770 $piddir > else > echo_n "$piddir is not writable for $owner" > failure; echo > exit 1 > fi > fi > else > mkdir -p $piddir > owner=`grep \^nsslapd-localuser $1/dse.ldif | awk '{print $2}'` > if [ -n "$owner" ] ; then > chown $owner $piddir > chmod 700 $piddir > fi > fi >} > >start_script=@sbindir@/start-ds-admin >restart_script=@sbindir@/restart-ds-admin >stop_script=@sbindir@/stop-ds-admin >exec=`grep "^HTTPD=" $start_script | awk -F= '{print $2}'` >prog="@package_name@" ># PID directory >piddir="@localstatedir@/run/@PACKAGE_BASE_NAME@" ># PID file >pidfile=$piddir/admin-serv.pid > >[ -f $exec ] || exit 0 > >umask 077 > >start() { > if [ ! -f $start_script ]; then > echo_n "*** Error: $start_script does not exist" > failure; echo > exit 1 > fi > echo "Starting $prog: " > # Start every slapd instance that isn't already running > > # the server creates pidfile and writes the pid to it when it is fully > # started and available to serve clients > server_running=0 > if [ -f $pidfile ]; then > pid=`cat $pidfile` > if kill -0 $pid > /dev/null 2>&1 ; then > echo_n " already running" > success; echo > server_running=1 > else > echo_n " not running, but pid file exists - attempt to start anyway..." > rm -f $pidfile > fi > fi > server_started=0 > if [ $server_running -eq 0 ] ; then > rm -f $pidfile > fix_pid_dir_ownership > $start_script > if [ $? -eq 0 ]; then > server_started=1 # well, perhaps not running, but started ok > else > failure; echo > fi > fi > if [ $server_started -eq 1 ] ; then > loop_counter=1 > # wait for 10 minutes (600 times 1 seconds) > max_count=600 > while test $loop_counter -le $max_count ; do > loop_counter=`expr $loop_counter + 1` > if test ! -f $pidfile ; then > sleep 1 > else > pid=`cat $pidfile` > break > fi > done > if kill -0 $pid > /dev/null 2>&1 && test -f $pidfile ; then > success; echo > else > echo_n "*** Error: $prog failed to start" > failure; echo > fi > fi >} > >stop() { > if [ ! -f $stop_script ]; then > echo_n "$stop_script does not exist" > failure; echo > exit 1 > fi > echo "Shutting down $prog: " > if [ -f $pidfile ]; then > pid=`cat $pidfile` > server_stopped=0 > if kill -0 $pid > /dev/null 2>&1 ; then > kill $pid > if [ $? -eq 0 ]; then > server_stopped=1 > else > failure; echo > fi > fi > if [ $server_stopped -eq 1 ] ; then > loop_counter=1 > # wait for 10 minutes (600 times 1 second) > max_count=600 > while test $loop_counter -le $max_count; do > loop_counter=`expr $loop_counter + 1` > if kill -0 $pid > /dev/null 2>&1 ; then > sleep 1 > else > if test -f $pidfile ; then > rm -f $pidfile > fi > break > fi > done > if test -f $pidfile ; then > echo_n "*** Error: $prog failed to stop" > failure; echo > else > success; echo > rm -f $pidfile > fi > fi > fi >} > >restart() { > stop > start >} > > >status() { > if [ -f $pidfile ]; then > pid=`cat $pidfile` > if kill -0 $pid > /dev/null 2>&1 ; then > echo "$prog (pid $pid) is running..." > else > echo "$prog dead but pid file exists" > fi > else > echo "$prog is stopped" > fi >} > > >case "$1" in > start|stop|restart|reload|status) > $1 > ;; > condrestart) > [ ! -f $lockfile ] || restart > ;; > *) > echo Unknown command $1 > echo "Usage: $0 {start|stop|status|restart|condrestart}" > exit 2 >esac
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 244325
: 157057 |
157134