Adding entry to inittab file

From: Joe Spanicek <joe_at_resptk.bhp.com.au>
Date: Fri, 3 Feb 95 11:44:33 EST

Hi all,

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...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
Tecplot license manager already running, bye...
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', this 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 in advance..
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 Thu Feb 02 1995 - 19:38:27 NZDT

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