Mailinglist Archive: opensuse-factory (689 mails)

< Previous Next >
[opensuse-factory] Re: why are raw scripts forced into /bin/sh instead of user's shell (a Suse patch to bash)
On Fri, 1 Mar 2013 01:06, Ruediger Meier <sweet_f_a@...> wrote:

On Friday 01 March 2013, Carlos E. R. wrote:
El 2013-02-27 a las 22:52 -0600, Larry Finger escribió:
On 02/27/2013 09:59 PM, Linda Walsh wrote:

Why do you think this is SUSE only. Every distro has a default
shell, which is what you get when you do not specify the shell to
use.

/bin/sh is a link to a shell. Linda, find out which it is in your
system.

And note that if you invoke /bin/bash by the /bin/sh link then some
bashisms are disabled.

To give an example ...

rudi@tenfore:~> ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2012-11-13 23:17 /bin/sh -> bash
rudi@tenfore:~> bash -c ". .bashrc"
rudi@tenfore:~> sh -c ". .bashrc"
sh: line 0: .: .bashrc: file not found
rudi@tenfore:~>

Yep! But the most perfide thing is: some of the bashisms still work.

If a script still works with "/bin/sh -> bash", do the test again,
with "/bin/sh -> ash", as not even zsh, nor (t)csh are disabling all
the "extras" when called as /bin/sh .

Happy debugging! (I've killed more than 2500 hours on such sh.t)

- Yamaban
< Previous Next >
List Navigation
Follow Ups
References