[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: interpretted scripts (Re: service helper package)



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.

> > 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
writing something as simple as an init script.
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran@debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature


Reply to: