On Fri, 16 Apr 2021 20:12:16 -0500
DJ Lucas <blfs-...@lucasit.com> wrote:

> On 4/9/2021 5:16 AM, Scott Andrews wrote:
> > This script is not intended to run with ash, the she bang line is
> > as follows
> >
> > #!/bin/bash --posix  
> 
> 
> My apologies for the duplicate reply Scott, I didn't reply to list.
> 
> 
> Unfortunately, init-functions is a special case. You cannot
> guarantee that the calling script will use /bin/bash. 

You can on a lfs/blfs system and the script all the init
scripts use /bin/bash.

>That script
> will be run under whatever interpreter is used by the calling
> script (the schebang in init-functions is basically meaningless).
> When making any changes in init-functions, you have to test at
> least under dash (it's not a 1:1 for AST/AT&T ash, but close
> enough, and building AST ash is likely a non-starter now days). You
> don't get a choice here, it has to be sh compliant because we have
> no control over what a vendor supplied script will use.
> 
> --DJ
> 



Well on a lfs system which shell is the default shell?

Second the various init scripts that lfs currently use are
mixed /bin/bash and /bin/sh.

What vendor supplied script?  We are talking lfs/blfs here.
Why would a vendor script source init-functions? It most likely
wouldn't work anyway if it did.

sh compliant in what way? POSIX? UNIX?
The sh used by lfs (gnu bash) is what I call sh++ as it uses and
accept most bash builtins.

If you test my changes you will see that they run the same sourced
by a script using /bin/sh or /bin/bash (I tested for that).  And yes
I do know that LSB requires the scripts to be /bin/sh, but we are
again talking lfs here.

BTW is dash even in the BOOK?

I have no use for dash or ash.

If I was to use dash and posted here I would simply be told your
distro your rules, so after all, why would that not apply here for
some one wanting to use dash or a vendor script?
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to