tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: joe () resptk ! bhp ! com ! au (Joe Spanicek)
To: tru64-unix-managers
Subject: Summary: Adding entry to initab file
Date: Mon, 13 Feb 1995 16:32:28 +0000	[thread overview]
Message-ID: <96075317506498.tru64-unix-managers.marc@archive.invalid> (raw)


Hi osf-managers,

For the following posting:

>> I am having a bit of trouble adding entries to the inittab file.
>> I recently installed 'Tecplot' which requires a License Manager Daemon
>> to run which should start 'once' on bootup.
>> 
>> The command line to run is as follows:
>> 
>>     /usr/local/tecplot6/tlm/tlmd          \
>>     -l /usr/local/tecplot6/tlm/elm.log    \
>>     -e /usr/local/tecplot6/tlm            \
>>     -r /usr/local/tecplot/tlm/license.res
>> 
>> No '&' is required as it reruns in the background itself.
>> 
>> I tried placing the following command in '/etc/initab':
>> tecplot6:3:respawn:/usr/local/tecplot6/tlm/start_license > /dev/console 2>&1
>> 
>> where 'start_license' is the following shell script:
>> #!/usr/bin/sh
>> #
>> # Startup script for tecplot license manager
>> #
>> 
>> #
>> # Check if tlmd is already running
>> #
>> TEST=`ps ax | grep tlmd | grep -v grep`
>> 
>> if test "$TEST" = ""
>> then
>>     echo "Starting tecplot license manager..." > /dev/console 2>&1
>> 
>>     /usr/local/tecplot6/tlm/tlmd          \
>>     -l /usr/local/tecplot6/tlm/elm.log    \
>>     -e /usr/local/tecplot6/tlm            \
>>     -r /usr/local/tecplot/tlm/license.res
>> else
>>   echo "Tecplot license manager already running, bye..." > /dev/console 2>&1
>> fi
>> 
>> The problem is as follows:
>> 
>> 1) I added the entry above to '/etc/inittab' file
>> 
>> 3) After a little while the 'init' program read the '/etc/inittab' file
>>    and ran the 'start_license' script with the following output sent
>>    to the console
>> 
>> Starting tecplot license manager...
>> Tecplot license manager already running, bye...
>> Tecplot license manager already running, bye...
>> Tecplot license manager already running, bye...
>> Tecplot license manager already running, bye...
>> 
>> INIT: Command is respawning too rapidly. Check for possible errors.
>> id:tecplot6 "/usr/local/tecplot6/tlm/start_license > /dev/console 2>&1"
>> 
>> My question is: it is obvious I did not set it up properly.
>> 
>> Should I use 'bootwait' instead of 'respawn', meaning the 'start_license'
>> script is run only once at bootup.
>> 
>> The problem I may encounter is the 'tlmd' daemon may die for some reason
>> and I would like it to rerun the script and restart the deamon again,
>> otherwise Tecplot can not be used by users.
>> 
>> I assume 'init' is checking if the 'start_license' is still running & since
>> it dies straight away it respawns it again and again.
>> 
>> What i ask, is there a different approach I should take.
>> 

Thanks to the following who replied:

Sophia Liow <Sophia.Liow@dms.csiro.au>
Dave Cherkus <cherkus@UniMaster.COM>
Warren Smith <warrens@rmit.edu.au>
Eng Sin Teoh <engsin@anjing.enet.dec.com>
Ernie Rael <ernie@maspar.com>
D. Brian Kimmel <briank@medio.com>
Pete Hendry <pgh@cs.strath.ac.uk>
Rick Beebe <BEEBE@BIOMED.MED.YALE.EDU>
Scott J. Kamin <sjk@kapre.com>
Paul E. Rockwell <rockwell@rch.dec.com>
Geordie Klueber <gfkpci@borg.cis.rit.edu>
Kristian Koehntopp <kris@oekoalpha.pz-oekosys.uni-kiel.d400.de>

Most repsonses were similar, and a summary follows:

1) - Put the tecplot script above into '/sbin/init.d' and call it tecplot
   - in '/sbin/rc3.d' have a file S96tecplot as symbolic link to
     '/sbin/init.d/tecplot'
   - This starts up the licence manager once.

2) - Create a continuous loop in the above script to check if the 'tlmd' daemon
     dies and then restart it.

3) - Place a 'wait' statement after starting 'tlmd' in the above script.
   - NOTE: This does not work, though it seems to be a logical solution.

The option I took was (1). Looking at the responses I think I went into
overkill wanting the 'start_license' to be rerun when the daemon dies.
A daemon is a daemon and probably will very rarely die, so option (1)
was a good choice. Option (2) will certaintly work, when if it ever does
die. I tried option (3) and the same problem occures. Though I can not see
why it wouldn't work.

Again thanks to all, sorry for the long summary for a trivial solution &
happy computing..... 

Joe
+-----------------------------------------------------------------------------+
|                                                                             |
|              Joe Spanicek                                                   |
|     /\/\     Research Officer                                               |
|    / / /\    Process Engineering R & D                                      |
|   / / /  \                                                                  |
|  / / / /\ \  BHP Research - Port Kembla Labs                                |
|  \ \/ / / /  P.O Box 77, Port Kembla, NSW Australia 2505                    |
|   \  / / /   Fax: +61 (42) 756120                                           |
|    \/\/\/    Tel: +61 (42) 756078                                           |
|              Email: joe@resptk.bhp.com.au                                   |
|                                                                             |
+-----------------------------------------------------------------------------+

                 reply	other threads:[~1995-02-13 16:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox