Re: Bashism in LFS-bootscripts

2005-05-19 Thread Nathan Coulson
On 5/20/05, Matthew Burgess <[EMAIL PROTECTED]> wrote: > Steve Crosby wrote: > > > Just drop the "[" construct altogether and use /bin/test exclusively? > > Well, I'd much prefer just punting on this. Let's just assume that if a > shell implements 'test' then it does so in a standards conformant

Re: Bashism in LFS-bootscripts

2005-05-19 Thread Matthew Burgess
Steve Crosby wrote: Just drop the "[" construct altogether and use /bin/test exclusively? Well, I'd much prefer just punting on this. Let's just assume that if a shell implements 'test' then it does so in a standards conformant manner. If it doesn't then the affected user reports it as a bug u

Re: Bashism in LFS-bootscripts

2005-05-19 Thread Steve Crosby
On 20 May 2005, you wrote in lfs.dev: > Robert Russell wrote: >> On 5/19/05, Bryan Kadzban <[EMAIL PROTECTED]> wrote: >> > However, we might be able to do something with exec in a subshell > instead (since exec won't run a builtin or function, only an > executable): > > if ( exec [ -r file1 ] )

Re: Bashism in LFS-bootscripts

2005-05-19 Thread Bryan Kadzban
Robert Russell wrote: > On 5/19/05, Bryan Kadzban <[EMAIL PROTECTED]> wrote: > >> We could use the "enable" builtin to disable the builtin versions >> in bash: >> >> enable -n test [ >> >> I'm (again) not sure about other shells, though... > > > Wouldn't the binaries in /bin be used if the she

Re: Bashism in LFS-bootscripts

2005-05-19 Thread Robert Russell
On 5/19/05, Bryan Kadzban <[EMAIL PROTECTED]> wrote: > On Thu, May 19, 2005 at 04:38:30PM +0100, Matthew Burgess wrote: > > Both '[' and 'test' are bash builtins as well as > > binaries in /bin. Is there anyway we can force the bootscripts to > > choose the implementations in /bin without having t

Re: Building LFS Without Linux/Root Access

2005-05-19 Thread Jim Gifford
Michael Kipper wrote: Hi! Okay, I know, wierd subject line, but what I'm trying to accomplish is this: Currently, I build my LFS system from a set of scripts; usually, it's just a matter of a '# make lfs' before I go to sleep, and when I wake up, there's a shiny new LFS system, configured and ready

Building LFS Without Linux/Root Access

2005-05-19 Thread Michael Kipper
Hi! Okay, I know, wierd subject line, but what I'm trying to accomplish is this: Currently, I build my LFS system from a set of scripts; usually, it's just a matter of a '# make lfs' before I go to sleep, and when I wake up, there's a shiny new LFS system, configured and ready to go for me. Howev

Re: Bashism in LFS-bootscripts

2005-05-19 Thread Bryan Kadzban
On Thu, May 19, 2005 at 04:38:30PM +0100, Matthew Burgess wrote: > Both '[' and 'test' are bash builtins as well as > binaries in /bin. Is there anyway we can force the bootscripts to > choose the implementations in /bin without having to rely on potentially > non-SUSV3 conformant shell builtin

Re: Bashism in LFS-bootscripts

2005-05-19 Thread Matthew Burgess
Matthew Burgess wrote: http://www.opengroup.org/onlinepubs/009695399/utilities/test.html suggests it's standardised, so as long as the shell you're using adheres to the SUSV3 standard that construct should work just fine. OK, cluebat needed. Both '[' and 'test' are bash builtins as well as bina

Re: Bashism in LFS-bootscripts

2005-05-19 Thread Matthew Burgess
Bryan Kadzban wrote: Or should it be: if [ $CUR_LENGTH -eq 0 ]; then instead, to do a numeric comparison? (Either with or without the quotes. It shouldn't matter unless $CUR_LENGTH might be unset.) I was thinking the same thing. (OTOH, is that a bashism too? I'd hope not, but I don't know for su

Re: Bashism in LFS-bootscripts

2005-05-19 Thread Bryan Kadzban
Alexander E. Patrakov wrote: > In /etc/rc.d/init.d/functions, we have: > > # if CUR_LENGTH was set to zero, then end the line > if [ "${CUR_LENGTH}" == "0" ]; then > echo "" > fi > > "==" is a bash-specific "pattern matching" operator. In this context, it >