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
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.
(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
(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.
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
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 :)