Summary: Adding entry to initab file

From: Joe Spanicek <joe_at_resptk.bhp.com.au>
Date: Mon, 13 Feb 95 16:32:28 EST

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_at_dms.csiro.au>
Dave Cherkus <cherkus_at_UniMaster.COM>
Warren Smith <warrens_at_rmit.edu.au>
Eng Sin Teoh <engsin_at_anjing.enet.dec.com>
Ernie Rael <ernie_at_maspar.com>
D. Brian Kimmel <briank_at_medio.com>
Pete Hendry <pgh_at_cs.strath.ac.uk>
Rick Beebe <BEEBE_at_BIOMED.MED.YALE.EDU>
Scott J. Kamin <sjk_at_kapre.com>
Paul E. Rockwell <rockwell_at_rch.dec.com>
Geordie Klueber <gfkpci_at_borg.cis.rit.edu>
Kristian Koehntopp <kris_at_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_at_resptk.bhp.com.au |
| |
+-----------------------------------------------------------------------------+
Received on Mon Feb 13 1995 - 00:26:43 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT