Toby Allsopp wrote:
> On Tue, Feb 20, 2001 at 01:26:08PM +0100, Christopher Albert wrote:
> > Thus, for "go.sh" , ommitting some details, including the jetty and
> > tomcat options found in run.sh of jBoss_FINAL-2.0.
> > ######################################################
> > #GO.SH
> > ######################################################
> > #!/bin/sh
> > #
> > #go.sh
> > # Shell script to start and stop the server
> >
> > if [ -z "$JBOSS_HOME" ] ; then
> > export JBOSS_HOME=/usr/local/jboss
> > fi
>
> Putting my pedantic, cross-platform hat on again, that export statement
> isn't valid sh syntax either. In sh you need to say:
>
> JBOSS_HOME=/usr/local/jboss
> export JBOSS_HOME
>
> There are probably more bash-isms, but I'm not that good at spotting them.
>
> Can someone run these scripts on a system where /bin/sh is actually the
> Bourne shell rather than bash or ksh? I think one of the BSDs might qualify.
>
> BTW: I know that these are explicitly Linux scripts, but IMHO it's just bad
> form to rely on /bin/sh being something other than sh.
>
> Toby.
Toby,
AFAIK, on Linux /bin/sh is (a symlink to) bash. The Bourne shell , being
commercial, is not delivered with Linux distributions. Thus, by default,
/bin/sh is bash. In addition, when I said "Linux init script", perhaps I was
not precise enough. This is an init script for a RH 6.2/7.0 system. It wont
work on Suse, which doesn't source a function script, but has its own binary
equivalents to 'daemon', for example.
Chris