[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-admin
Subject:    [HPADM] SUMMARY: /etc/rc script
From:       meweed () quasar ! wittenberg ! edu
Date:       1996-03-29 14:46:56
[Download RAW message or body]

Thanks to all who replied.  I figured out most of my question after 
taking a good look at the scripts.  I also found the sh version of the rc 
script and replaced the instant ignition rc script..."I don't understand 
it, therfore I fear it, therefor it must die..."  It was rc.orig in the 
newconfig directory.  This file was saved over with the instant ignition 
version which was why I couldn't find it.  Luckly there was another copy 
in the /etc directory.  They are the same and can be interchanged as long 
as you add the system name in (it was still on unknown for the new 
script) and you add in your localrc() and initialize() modifications 
(those are the only two sections your suposed to modify).

The big problem that I didn't know about was that with CERN's httpd, 
using the -version option shows the version number, and doesn't start the 
daemon (me idiot).  I was swithching this around alot not thinking of it 
as a potential problem, so I couldn't isolate other factors.  It works fine 
now other than needing the config file tweeked to our system.

For reference, the command line's I added to the /etc/rc file were:

	# The following line is required for function syntax.
	# : # do nothing instruction (a function must contain some command)
	# Uncomment the above line if localrc() does nothing! -mew

# start httpd (WWW) server
  if [ -x /usr/local/WWW/bin/httpd ]; then
	(/usr/local/WWW/bin/httpd  && (echo -n ' httpd') ) & >/dev/console
  fi

        # sleep 15 allows processes time to start.
        # The other thing is that they must daemonize themselves properly,
        # which on HP-UX means calling setsid() and dropping their open
        # files. The sleep must give them time to do this. Anything still
        # attached to /etc/rc will be killed with it exits.
	sleep 15


------------------------------------------------------------------------------
The original question was:

Hello again all.

I've been trying to get httpd started from the /etc/rc script.  It's 
hasn't worked.  I took a good look at the /etc/rc file and found out that 
we still have the rc script for instant ignition.  This script is 
different from the "normal" rc script in that it must be run in ksh.  
This is the note in the beginning:

#! /bin/ksh
## Configured using SAM by root on Wed Nov  2 15:49:54 1994
# @(#) $Revision: 1.1 $
#
# This Instant Ignition version of /etc/rc script replaces 
# the original messages from /etc/rc with a status "checklist".
# Output and error messages from various commands are routed
# to the file /usr/adm/rc.log.
#
# NOTE: this script must run under Korn Shell. It sources the 
# file /etc/rc.utils which depends on ksh. If you need to use 
# Bourne shell for the rc script, then you may want to use
# standard version found in /etc/newconfig/rc.


I looked at the /etc/newconfig/rc script and it's the instant ignition 
one.  /etc/rc.util had the following to offer:



#!/bin/ksh
#
# $Revision: 1.1 $
#
# Filename:    /etc/rc.utils
# Language:    Korn shell script
# Description:
#
#    The rc.utils file provides an enhanced boot-up message scheme on
#    Instant Ignition systems.  Detailed system start-up messages from
#    the /etc/rc script (and its children) normally go directly to the
#    console.  The rc.utils script intercepts this output and logs it
#    to a file, /usr/adm/rc.log.  On the console a short "checklist"
#    indicates where the system is in the start-up process, and logs
#    the success or failure of each step.
#
#    The file /etc/rc.utils can be removed from the system safely.
#    You may choose to do this if you prefer to have the standard
#    "verbose" /etc/rc behavior.


Now, from what I can tell, this is why I can't get the httpd daemon to 
stay active (it does execute and output to the console, but once the rc 
script ends, so does the httpd process).  I have a sleep 15 statement in 
the local_rc portion after the execution command for httpd.  This was 
added as advice to allow daemon's to daemonize!! love that word.

Where from here?  I could remove the #! ksh line from /etc/rc and get rid 
of /etc/rc.utils as advised above, but I don't know if this is the best 
thing to do.  My instinct says to get the real /etc/rc script from 
someone with the same system.

All thoughts on the matter would be appreciated.  Has anyone run into 
this problem before?  Thank you for any help you can offer.


						M. Weed


****************************
Matthew E. Weed
meweed@quasar.wittenberg.edu
****************************


--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@cv.ruu.nl
  Name: hpux-admin@cv.ruu.nl                 Owner: owner-hpux-admin@cv.ruu.nl
 Archive: (FTP & browse):        ftp.cv.ruu.nl/pub/digests/hpux-admin 
          (Web, browse, search): http://hpux.ced.tudelft.nl/HPUX_ADMIN_ARCHIVE

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic