[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Making init scripts use dash



Em Qui, 2006-05-18 às 17:27 -0300, Margarita Manterola escreveu:
> During some tests I've performed, I've found that making the init
> scripts run with dash as default shell instead of bash makes the boot
> time a 10% faster (6 seconds in a 60 second boot).

Nice...

> To make this speed up available to everyone, we have 2 main choices:
> 1. Make /bin/sh point to /bin/dash
> This option also might imply some extra bugs, but it's believed that
> not so many, since there are already quite a number of people with
> /bin/sh -> /bin/dash, and they do file bugs when "bashisms" appear.

A tool searching for "bashisms" in init scripts and maintainer scripts
could help a lot on this...

> 2. Change #!/bin/sh for #!/bin/dash in the scripts

This would have quite the same effect of having two shells with
Essential: yes...

> Also, I've heard other options being posed, such as writing all init
> scripts (including /etc/init.d/rc) in python.  But I do want to
> concentrate on what's possible to do for etch or etch+1.

I don't think it's a good idea at all, as a shell will always be
required in the base system and will always be essential. And... if it
was to move to a higher-level language (which I don't think as needed),
why not Perl? which is already in the base system and is already an
essential package?

> So, mainly the question that I want to ask of the rest of the Debian
> community is if there are more arguments for or against these options,
> and what do you think would be the best route on implementing this.

/bin/sh is not /bin/bash, so any bashism in a script run with /bin/sh is
a bug. I really think using a more lightweight shell as essential is a
good thing.



Reply to: