Re: interpretted scripts (Re: service helper package)
On Mon, Nov 26, 2007 at 03:53:33PM +0000, Stephen Gran wrote:
> This one time, at band camp, Justin Pryzby said:
> > On Mon, Nov 26, 2007 at 02:13:42PM +0000, Stephen Gran wrote:
> > > This one time, at band camp, Jörg Sommer said:
> > > >
> > > > Init scripts should not use Bash, they should be Posix Shell scripts!
> > >
> > > Not strictly true. A script written for use with #!/bin/sh should use
> > > the POSIX superset allowed by policy. A script aimed at bsah should
> > By "superset" of posix I guess you mean posix + echo -n.
>
> IIRC policy also allows [ "$this" -a "$that" ] and [ "$this" -o "$that" ]
> although I might be confused in thinking those aren't POSIX.
-a and -o are XSI which AIUI is an (very common) extension of posix
(see standards.7). dash allows them but posh does not.
> > > just declare it's interpreter as #!/bin/bash. Generally, you don't need
> > > to do that, but you are allowed to.
> > Do you mean because bash is the default sh?
>
> No, I mean that bash specific features are not generally necessary in
Ah, ok; I didn't think that could be right :)
Justin
Reply to: