From: Chris B. <cb...@go...> - 2002-06-21 21:50:12
|
Hello all, I've got WebWare 0.7 installed on a Solaris 8 box alongside Apache 1.3.26, and Python 2.1.1 - and I'm having trouble getting the program to start on system boot. Using the included 'webkit' script, I place it in /etc/init.d, and make appropriate symlinks in the proper rc levels. At system boot, we get a syntax error on line 32 which says "Unexpected }". The sh shell doesn't appear to like the way the functions are being defined. So, testing from the command line, we found that if we use bash instead (which is what sh IS on RedHat) the script works just fine and the Appserver starts. What we did was to write a stub-script which poses as 'webkit' and just invokes the real 'webkit' script by explicitly calling bash first. Is there some easy fix here though that would make this script work unchanged in a REAL sh shell? (Solaris's startup scripts explicitly call sh on all the rc-level scripts, therefore putting #!/usr/bin/bash instead on the top doesn't help) Secondly, the startup script calls python directly - but at system startup on this system, the command fails, as 'python' is not in the path. What makes this worse, is that the script happily prints out the success message when in fact it failed. Thanks for your time, and looking forward to working with Webkit now that it's running ;) |
From: Chuck E. <ChuckEsterbrook@StockAlerts.com> - 2002-06-22 01:22:32
|
On Friday 21 June 2002 02:48 pm, Chris Backas wrote: > So, testing from the command line, we found that if we use bash > instead (which is what sh IS on RedHat) the script works just fine > and the Appserver starts. What we did was to write a stub-script > which poses as 'webkit' and just invokes the real 'webkit' script by > explicitly calling bash first. Is there some easy fix here though > that would make this script work unchanged in a REAL sh shell? > (Solaris's startup scripts explicitly call sh on all the rc-level > scripts, therefore putting #!/usr/bin/bash instead on the top doesn't > help) I don't know enough about sh vs. bash to say. I expected a #!/usr/bin/bash line to work, but as you pointed out, Solaris doesn't provide for that. I think you'll have to live with your stub script. > Secondly, the startup script calls python directly - but at system > startup on this system, the command fails, as 'python' is not in the > path. What makes this worse, is that the script happily prints out > the success message when in fact it failed. If Python is not your in your path, I think there is no other solution other than hard coding it. I agree that it shouldn't print success when it failed. We can add that to the bug list. My thought is that we should put Solaris comments at the top of the script to save the next person some research time. Sorry if I don't have stronger solutions, but those Solaris characteristics seem awfully weird... -Chuck |