tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Scripts problems trying to start at boot time.
@ 2001-01-26  2:27 Patrick Norris
  0 siblings, 0 replies; only message in thread
From: Patrick Norris @ 2001-01-26  2:27 UTC (permalink / raw)
  To: tru64-unix-managers

On some of our systems, we would like to have a script call an application (an Ada main program) to start it running as the system boots up.

We think we've got all the links and scripts configured correctly in init.d and rcX.d, including passing the required argument with the calling script, but it never manages to start.  We've even moved it up from 99 in the start scripts to just between two of the others that start up just fine.

If we execute the script by hand, it works just as we expect.

Can anyone offer suggestions on what we've overlooked on the following script that keeps us from getting the application running at boot?

Thanks,
-Patrick Norris
Patrick.Norris@trw.com

--------------script as 'running'-------------
#!/bin/sh
#
#
PATH=/sbin:/usr/sbin:/usr/bin:/Application_Code/lec:/Application_Code/lcf
export PATH
HOST=`/usr/sbin/rcmgr get HOSTNAME`
SYSTEM='/usr/sbin/rcmgr get STARTSYSTEM'
/bin/echo "Starting Application Software"
case $1 in
'start')
     if [ "$HOST" = "cenetlec" ]
     then
       /Application_Code/lec/ada_main &
       /bin/echo ""
       /bin/echo "LEC is coming up !"
     else
       if [ "$HOST" = "cenetlcf" ]
       then
         /Application_Code/lcf/ada_main &
         /bin/echo ""
         /bin/echo "LCF is coming up !"
       else
         /bin/echo ""
         /bin/echo "Invalid host.....application code not initiated !"
       fi
     fi
     ;;
'stop')
     if [ "$HOST" = "cenetlec" ]
     then
       pid=`/bin/ps -e -o pid,command | awk  '{ if ($2 == "/Application_Code/lec/ada_main") print $1 }'`
       else
       pid=`/bin/ps -e -o pid,command | awk  '{ if ($2 == "/Application_Code/lcf/ada_main") print $1 }'`
     fi
     if [ "X$pid" != "X" ]
     then
       /bin/kill -9  $pid
       /bin/echo "Application software is going down"
     fi
     ;;
*)
     $ECHO "usage: $0 {start|stop}"
     ;;
esac

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-01-26  2:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-26  2:27 Scripts problems trying to start at boot time Patrick Norris

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