lkml.org 
[lkml]   [2008]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Why use /bin/sh in kernel build system?
Date
From
On Apr 29, 2008, at 11:45 AM, Sam Ravnborg wrote:

>> I read in the latest Linux Journal magazine that someone noticed
>> that even
>> though the kernel scripts say #!/bin/sh, many of them are really
>> bash scripts.
>> This person went through the effort of changing the script to be
>> true 'sh'
>> scripts. Has that code been merged in?
>
> I have no patches pending but I may have lost them.
> As I am 100% ignorant about what is bash and what is not bash
> specialities
> I will more or less be blind when I apply them so I hope they are well
> tested.


So why use /bin/sh ever in the kernel build system? I consciously
began using /bin/bash consistently in scripts years ago because you
just never know what you get when you use /bin/sh. I remember
replacing /bin/sh with /bin/bash in gcc's build system to get it to
work on some system at some point. Life is too short to keep having to
fight silliness like this and I can't see a valid reason why a system
building a Linux kernel, or for that matter gcc, should not have the
bash shell installed on it.

And on some systems, changing /bin/sh to point to /bin/bash can result
in subtle problems with that system's environment, so that is not a
good option. At least by using /bin/bash you know what you get and the
dependency is then known to all.

--
Mark Rustad, MRustad@gmail.com




\
 
 \ /
  Last update: 2008-04-29 22:31    [W:1.435 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site