Operating System - HP-UX
1824993 Members
2190 Online
109678 Solutions
New Discussion юеВ

Need help with Startup csh Script

 
Jennifer Chiarelli
Regular Advisor

Need help with Startup csh Script

I need to start a flex license using the csh during system startup. I have no trouble running ksh scripts during startup, but have never done a csh startup script before.

The following script is in my /sbin/init.d directory. And I have a soft link in /sbin/rc3.d.

Am I missing something? How can a csh script be executed during startup? The /etc/rc.log file doe not indicate an error. Yet lmgrd is not running.

#!/bin/csh
PATH=/usr/sbin:/usr/bin:/sbin
mode=$1
case $mode in
'start_msg')
echo "Starting Flotherm License"
;;

'stop_msg')
echo "Stopping Flotherm License"
;;

'start')
source /flov20/flov22/flomerics/flotherm22/HP-UX/bin/setup
setenv DISPLAY local:0.0
/flov20/flov22/flomerics/flotherm22/HP-UX/bin/startFLEX bisher2
;;

'stop')
/flov20/flov22/flomerics/Flexlm61/HP-UX/lmutil lmdown
;;
esac
exit 0

Thanks in advance for any help!
It's a binary world!
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor

Re: Need help with Startup csh Script

Lanny:

If you have /etc/shells then make sure /usr/bin/csh an entry therein.

...JRF...
Andreas Voss
Honored Contributor

Re: Need help with Startup csh Script

Hi,

i've put you the (so i hope) correct script at the attachment.

Regards

Andrew
James R. Ferguson
Acclaimed Contributor

Re: Need help with Startup csh Script

Lanny:

I'm curious. Why are you using csh?

...JRF...
Jennifer Chiarelli
Regular Advisor

Re: Need help with Startup csh Script

Andreas,

Thanks!!! I'll give this a try. However, I was just informed I cannot interrupt a solve that is currently running on that system. It may be early next week, but I will provide feedback after I try it.
It's a binary world!
Jennifer Chiarelli
Regular Advisor

Re: Need help with Startup csh Script

James,

Flomerics (the software vendor) has told me that I must start the license from the csh. Also, I must source the setup file for all the environment variables. But yes, I was also thinking it could be done in the ksh like my other flex licenses.
It's a binary world!
James R. Ferguson
Acclaimed Contributor

Re: Need help with Startup csh Script

Lanny:

Ah, I scanned right over that in the script. Now I see why (ugh!). Thanks for the response back.

...JRF...
Jennifer Chiarelli
Regular Advisor

Re: Need help with Startup csh Script

Andreas,

I was able to test and Flexlm did not start.
here is the message from /etc/rc.log:

Output from "/sbin/rc3.d/S999flotherm start":
----------------------------
mode=start: Command not found.
mode: Undefined variable.
"/sbin/rc3.d/S999flotherm start" FAILED
It's a binary world!
James R. Ferguson
Acclaimed Contributor

Re: Need help with Startup csh Script

Lanny:

In Andreas' script, change "mode=$1" to "set mode=$1".

I think the script should then work as he intended.

...JRF...