From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075317506498.tru64-unix-managers.marc@archive.invalid> From: joe () resptk ! bhp ! com ! au (Joe Spanicek) Date: Mon, 13 Feb 1995 16:32:28 +0000 To: tru64-unix-managers Subject: Summary: Adding entry to initab file X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075317506498 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 Dave Cherkus Warren Smith Eng Sin Teoh Ernie Rael D. Brian Kimmel Pete Hendry Rick Beebe Scott J. Kamin Paul E. Rockwell Geordie Klueber Kristian Koehntopp 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 | | | +-----------------------------------------------------------------------------+