Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 176444 - (baselayout-2.0.0_alpha) Ability to change the script interpreter
Summary: (baselayout-2.0.0_alpha) Ability to change the script interpreter
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-29 10:42 UTC by Luigi 'Comio' Mantellini
Modified: 2007-05-03 06:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luigi 'Comio' Mantellini 2007-04-29 10:42:51 UTC
Hi,

the runscript engine invokes the default "/bin/sh" shell to execute the init scripts, that in my box is a link to the "big" /bin/bash shell. The usage of bash shell make the boot sequence too long and time-expensive. However switching to another "light" shell can make the boot sequence faster.

I want to change the base shell without modify the /bin/sh link, but just using  a parameter in some configuration file (/etc/conf.d/rc for example).

Is it possible to implement this feature?

I know that scripts must be sh-aware... (Now some init script requires bash to correctly execute).

thanks in advance.

ciao

luigi
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-05-02 11:58:46 UTC
Why don't you want to modify the /bin/sh link? /bin/sh should be guaranteed to be a POSIX compliant shell and anything that calls /bin/sh should expect it to be just that and no more.
Comment 2 Luigi 'Comio' Mantellini 2007-05-02 18:01:03 UTC
(In reply to comment #1)
> Why don't you want to modify the /bin/sh link? /bin/sh should be guaranteed to
> be a POSIX compliant shell and anything that calls /bin/sh should expect it to
> be just that and no more.
> 

Because at boot time I need that the system is faster... and a reduced shell (like busybox, ash) may be a good choice.

After the boot phase I wont a complete and full-featured sh shell (like bash).

ciao
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-05-02 18:54:43 UTC
(In reply to comment #2)
> Because at boot time I need that the system is faster... and a reduced shell
> (like busybox, ash) may be a good choice.
> 
> After the boot phase I wont a complete and full-featured sh shell (like bash).

Right, but you can have any shell as your login shell as defined in /etc/passwd.

Only programs care about /bin/sh 99% of the time I think.
Comment 4 SpanKY gentoo-dev 2007-05-02 20:35:14 UTC
while i agree with Roy's answer here wrt original report, i can see it going the other way ... you want /bin/sh to be say dash, but for whatever reason you want baselayout to use /bin/bash (perhaps for bashisms in conf.d/net) ...

but it may be hard to inject this configuration setting in as you'd have a chicken/egg problem ... you'd need the user's shell config before you source the user's config files ...

so i guess this isnt a trivial change so just close it as WORKSFORME:SET/bin/shYOURSELF
Comment 5 Roy Marples (RETIRED) gentoo-dev 2007-05-03 06:58:07 UTC
Yeah, I cannot justify the time taken to do this versus any gain we might get. If /bin/sh doesn't work as expected then the program using it needs to be fixed, and if that gets hidden away (which I think is what the reporter really wants) then it just takes longer to fix things :)