Re: Making init scripts use dash

2006-05-30 Thread Steve Greenland
On 29-May-06, 03:57 (CDT), Ralf Wildenhues [EMAIL PROTECTED] wrote: FWIW, libtool scripts are a bit more complex. Unrelated though, Libtool records the shell and its features; if you change /bin/sh from bash to dash, the installed /usr/bin/libtool will have its $echo setting wrong, and break

Re: Making init scripts use dash

2006-05-29 Thread Ralf Wildenhues
Sorry for the late message to this thread. * Gabor Gombas wrote: On Sat, May 20, 2006 at 01:58:14AM +0200, Adam Borowski wrote: Thus, it's bash's start-up which is the slow part, in the terms of actual speed, bash is not that far behind. It would be interesting to compare something more

Re: Making init scripts use dash

2006-05-25 Thread Jörg Sommer
Hello Gabor, Gabor Gombas [EMAIL PROTECTED] wrote: On Sat, May 20, 2006 at 01:58:14AM +0200, Adam Borowski wrote: Thus, it's bash's start-up which is the slow part, in the terms of actual speed, bash is not that far behind. It would be interesting to compare something more complex than

Re: Making init scripts use dash

2006-05-25 Thread Ian Jackson
Michal Politowski [EMAIL PROTECTED]: On Thu, 18 May 2006 22:38:08 +0200, Goswin von Brederlow wrote: [...] 3. Make sh an alternative dash already optionally diverts it. Isn't it good enough? Both of these are a really bad idea. If anything goes wrong at the wrong moment, /bin/sh would be

Re: Making init scripts use dash

2006-05-23 Thread Felipe Sateler
gregor herrmann wrote: IIRC lintian does this already. And devscripts contains a 'checkbashishms' tool -- Felipe Sateler -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]

Re: Making init scripts use dash

2006-05-23 Thread Gabor Gombas
On Mon, May 22, 2006 at 01:55:54PM +, Jörg Sommer wrote: But what counts more in the comparison dash vs. bash is the shell startup. And the shell is started for every script not name foo.sh. Also, if init scripts will be really parallel (meaning lots of concurrent scripts, not just 2-3),

Re: Making init scripts use dash

2006-05-23 Thread Gabor Gombas
On Tue, May 23, 2006 at 01:19:44PM +0200, Gabor Gombas wrote: difference. Some very basic tests using callgrind show that bash uses 20-30 times more CPU cache than dash. And when things are running Er, fat fingers. The difference is just 2-3 times. Gabor --

Re: Making init scripts use dash

2006-05-23 Thread Gabor Gombas
On Sat, May 20, 2006 at 01:58:14AM +0200, Adam Borowski wrote: The interesting fact is that, contrary to what I expected, running configure was improved by only about 1% on average. That may come from the fact that configure uses only the most basic shell constructs (it does not even use

Re: Making init scripts use dash

2006-05-22 Thread Jörg Sommer
Hello Wouter, Wouter Verhelst [EMAIL PROTECTED] wrote: On Fri, May 19, 2006 at 04:49:49PM +0200, Olaf van der Spek wrote: On 5/19/06, Wouter Verhelst [EMAIL PROTECTED] wrote: Why would they have to work with dash? If the difference in speed is indeed that insane, that's nice. I've received

Re: Making init scripts use dash

2006-05-21 Thread Wouter Verhelst
On Fri, May 19, 2006 at 04:49:49PM +0200, Olaf van der Spek wrote: On 5/19/06, Wouter Verhelst [EMAIL PROTECTED] wrote: On Fri, May 19, 2006 at 05:45:46AM +0200, David Weinehall wrote: Well, most of those scripts can be fixed quite easily, some require a bit more work. I hereby promise to

Re: Making init scripts use dash

2006-05-21 Thread David Weinehall
On Fri, May 19, 2006 at 03:34:17PM +0200, Wouter Verhelst wrote: On Fri, May 19, 2006 at 05:45:46AM +0200, David Weinehall wrote: Well, most of those scripts can be fixed quite easily, some require a bit more work. I hereby promise to help fixing them to the extent of my capability.

Re: Making init scripts use dash

2006-05-19 Thread Loïc Minier
On Thu, May 18, 2006, Margarita Manterola wrote: 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). [...] 2. Change #!/bin/sh for #!/bin/dash in the scripts

Re: Making init scripts use dash

2006-05-19 Thread Marco d'Itri
On May 19, David Weinehall [EMAIL PROTECTED] wrote: That would mean having 2 shells since some scripts need bash. What a waste on small systems. Well, most of those scripts can be fixed quite easily, some require a bit more work. I hereby promise to help fixing them to the extent of my

Re: Making init scripts use dash

2006-05-19 Thread Joey Hess
Margarita Manterola wrote: Option (1) implies making dash base and Essential: yes (currently dash is optional), and that would imply that until no Essential package depends on bash, we would have two shells in Essential. Since initramfs-tools, yaird, and initrd-tools all depend on dash anyway,

Re: Making init scripts use dash

2006-05-19 Thread Joey Hess
Olaf van der Spek wrote: Can't you only change the symlink if/when dash is installed? Yes, dash manages /bin/sh in a sensible manner. dpkg-reconfigure dash to switch the symlink to it. -- see shy jo signature.asc Description: Digital signature

Re: Making init scripts use dash

2006-05-19 Thread Joey Hess
Jeroen van Wolffelaar wrote: Of course, all the packages in question must then depend on dash, but that's not really a problem IMHO. The only problem I do see is that dash currently asks a question upon installation, which I think it should simply stop doing so, administrators who want this

Re: Making init scripts use dash

2006-05-19 Thread Petter Reinholdtsen
[Margarita Manterola] 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). I saw (parts of) your talk at debconf on this topic, and was happy to see the

Re: Making init scripts use dash

2006-05-19 Thread Michal Čihař
Hi On Fri, 19 May 2006 10:12:57 +0200 Petter Reinholdtsen [EMAIL PROTECTED] wrote: I believe this is a fairly safe thing to do, but believe it should be done shortly after etch releases, and not just a few months before we freeze for etch. There are other things we can manage before etch

Re: Making init scripts use dash

2006-05-19 Thread Goswin von Brederlow
Henrique de Moraes Holschuh [EMAIL PROTECTED] writes: On Fri, 19 May 2006, Goswin von Brederlow wrote: Alternatives are more suited for cases where one binary is provided by multiple packages. Currently we have bash, dash, sash, posh. Anything else? Are you prepared to put your life on the

Re: Making init scripts use dash

2006-05-19 Thread Wouter Verhelst
On Fri, May 19, 2006 at 05:45:46AM +0200, David Weinehall wrote: Well, most of those scripts can be fixed quite easily, some require a bit more work. I hereby promise to help fixing them to the extent of my capability. Let's see. The nbd-client and nbd-server initscripts use bash arrays. Do

Re: Making init scripts use dash

2006-05-19 Thread Wouter Verhelst
On Fri, May 19, 2006 at 02:05:12AM +0200, Marco d'Itri wrote: On May 19, Wouter Verhelst [EMAIL PROTECTED] wrote: Since bash does enable some features that are not specified in POSIX, even when called as /bin/sh, I don't see what the problem would be of installing something else as our

Re: Making init scripts use dash

2006-05-19 Thread Wouter Verhelst
On Fri, May 19, 2006 at 09:44:45AM +0200, Loïc Minier wrote: On Thu, May 18, 2006, Margarita Manterola wrote: 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

Re: Making init scripts use dash

2006-05-19 Thread Kevin B. McCarty
Goswin von Brederlow wrote: Margarita Manterola [EMAIL PROTECTED] writes: 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). To make this speed up

Re: Making init scripts use dash

2006-05-19 Thread Adam Borowski
On Fri, May 19, 2006 at 10:18:46AM +0200, Michal Čihař wrote: There are anyway users using dash as /bin/sh right now and broken packages are bugged, so switching default should not reveal any new bug The policy says: # If a script requires non-POSIX features from the shell interpreter, the #

Re: Making init scripts use dash

2006-05-19 Thread Marco d'Itri
On May 19, Adam Borowski [EMAIL PROTECTED] wrote: Besides, here's an idea: let's make it karma-mandatory for debian-devel readers to have /bin/sh point to foosh for sh!=ba. The more people people use alternate shells, the faster bugs are exposed. Good idea, just don't try it with posh. And

Re: Making init scripts use dash

2006-05-19 Thread Goswin von Brederlow
Wouter Verhelst [EMAIL PROTECTED] writes: On Fri, May 19, 2006 at 05:45:46AM +0200, David Weinehall wrote: Well, most of those scripts can be fixed quite easily, some require a bit more work. I hereby promise to help fixing them to the extent of my capability. Let's see. The nbd-client and

Re: Making init scripts use dash

2006-05-19 Thread Olaf van der Spek
On 5/19/06, Wouter Verhelst [EMAIL PROTECTED] wrote: On Fri, May 19, 2006 at 05:45:46AM +0200, David Weinehall wrote: Well, most of those scripts can be fixed quite easily, some require a bit more work. I hereby promise to help fixing them to the extent of my capability. Let's see. The

Re: Making init scripts use dash

2006-05-19 Thread Gabor Gombas
On Fri, May 19, 2006 at 03:17:20AM +0200, Goswin von Brederlow wrote: Alternatives are more suited for cases where one binary is provided by multiple packages. Currently we have bash, dash, sash, posh. Anything else? Alternatives break on a daily basis, I wouldn't trust them for something as

Re: Making init scripts use dash

2006-05-19 Thread Frank Küster
Adam Borowski [EMAIL PROTECTED] wrote: On Fri, May 19, 2006 at 10:18:46AM +0200, Michal Čihař wrote: There are anyway users using dash as /bin/sh right now and broken packages are bugged, so switching default should not reveal any new bug The policy says: # If a script requires non-POSIX

Re: Making init scripts use dash

2006-05-19 Thread Goswin von Brederlow
Gabor Gombas [EMAIL PROTECTED] writes: On Fri, May 19, 2006 at 03:17:20AM +0200, Goswin von Brederlow wrote: Alternatives are more suited for cases where one binary is provided by multiple packages. Currently we have bash, dash, sash, posh. Anything else? Alternatives break on a daily

Re: Making init scripts use dash

2006-05-19 Thread Maximiliano Curia
On Friday 19 May 2006 05:12, Petter Reinholdtsen wrote: I was a bit surprised that parallel execution only shaved 2 seconds of the boot, but suspect it might be because of inefficient implementation in /etc/init.d/rc. Not really a /etc/init.d/rc fault, is more likely a problem that there is

Re: Making init scripts use dash

2006-05-19 Thread Henrique de Moraes Holschuh
On Fri, 19 May 2006, Goswin von Brederlow wrote: Henrique de Moraes Holschuh [EMAIL PROTECTED] writes: On Fri, 19 May 2006, Goswin von Brederlow wrote: Alternatives are more suited for cases where one binary is provided by multiple packages. Currently we have bash, dash, sash, posh.

Re: Making init scripts use dash

2006-05-19 Thread Petter Reinholdtsen
[Loïc Minier] Right now, if a script is named .sh, it is sourced, perhaps it's enough to change /etc/init.d/rc to use dash, depend on dash there (sysv-rc), and progressively convert init scripts to use a symlink ending in .sh when they are POSIX? Actually, if we want to run the scripts in

Re: Making init scripts use dash

2006-05-19 Thread Lars Wirzenius
pe, 2006-05-19 kello 09:35 +0200, Marco d'Itri kirjoitti: On May 19, David Weinehall [EMAIL PROTECTED] wrote: That would mean having 2 shells since some scripts need bash. What a waste on small systems. Well, most of those scripts can be fixed quite easily, some require a bit more

Re: Making init scripts use dash

2006-05-19 Thread Adam Borowski
On Thu, May 18, 2006 at 05:27:23PM -0300, Margarita Manterola wrote: 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). This speed-up is not limited to

Re: Making init scripts use dash

2006-05-19 Thread Marco d'Itri
On May 19, Lars Wirzenius [EMAIL PROTECTED] wrote: Some may need bash for a reason. Making them more complex just to have them work with dash is not useful. If a script really needs bash, then starting it with #!/bin/bash is perfectly acceptable. I doubt there are very many such scripts.

Making init scripts use dash

2006-05-18 Thread Margarita Manterola
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). To make this speed up available to everyone, we have 2 main choices: 1. Make /bin/sh point to /bin/dash 2.

Re: Making init scripts use dash

2006-05-18 Thread Olaf van der Spek
On 5/18/06, Margarita Manterola [EMAIL PROTECTED] wrote: 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). To make this speed up available to everyone, we

Re: Making init scripts use dash

2006-05-18 Thread Florent Bayle
Le Jeudi 18 Mai 2006 22:31, Olaf van der Spek a écrit : On 5/18/06, Margarita Manterola [EMAIL PROTECTED] wrote: 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

Re: Making init scripts use dash

2006-05-18 Thread Goswin von Brederlow
Margarita Manterola [EMAIL PROTECTED] writes: 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). To make this speed up available to everyone, we have 2 main

Re: Making init scripts use dash

2006-05-18 Thread Daniel Ruoso
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

Re: Making init scripts use dash

2006-05-18 Thread gregor herrmann
On Thu, May 18, 2006 at 06:10:06PM -0300, Daniel Ruoso wrote: 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

Re: Making init scripts use dash

2006-05-18 Thread Marco d'Itri
On May 18, Margarita Manterola [EMAIL PROTECTED] wrote: To make this speed up available to everyone, we have 2 main choices: 1. Make /bin/sh point to /bin/dash 2. Change #!/bin/sh for #!/bin/dash in the scripts We have an even simpler choice which already works and does not require changes

Re: Making init scripts use dash

2006-05-18 Thread Jeroen van Wolffelaar
On Thu, May 18, 2006 at 05:27:23PM -0300, Margarita Manterola wrote: 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). To make this speed up available to

Re: Making init scripts use dash

2006-05-18 Thread Gustavo Franco
On 5/18/06, Marco d'Itri [EMAIL PROTECTED] wrote: On May 18, Margarita Manterola [EMAIL PROTECTED] wrote: To make this speed up available to everyone, we have 2 main choices: 1. Make /bin/sh point to /bin/dash 2. Change #!/bin/sh for #!/bin/dash in the scripts We have an even simpler

Re: Making init scripts use dash

2006-05-18 Thread Michal Politowski
On Thu, 18 May 2006 22:38:08 +0200, Goswin von Brederlow wrote: [...] 3. Make sh an alternative dash already optionally diverts it. Isn't it good enough? -- Michał Politowski Talking has been known to lead to communication if practiced carelessly.

Re: Making init scripts use dash

2006-05-18 Thread Marco d'Itri
On May 18, Gustavo Franco [EMAIL PROTECTED] wrote: Good, but i think interested people here are all our users, so what we're going to do with the 10% performance hit for use bash? I think Nothing. A 10% optimization of init scripts which we already know are highly suboptimal is not worth

Re: Making init scripts use dash

2006-05-18 Thread Wouter Verhelst
On Thu, May 18, 2006 at 05:27:23PM -0300, Margarita Manterola wrote: 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. If you're going to use a real

Re: Making init scripts use dash

2006-05-18 Thread Wouter Verhelst
On Thu, May 18, 2006 at 11:29:47PM +0200, Jeroen van Wolffelaar wrote: On Thu, May 18, 2006 at 05:27:23PM -0300, Margarita Manterola wrote: 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 -

Re: Making init scripts use dash

2006-05-18 Thread Marco d'Itri
On May 19, Wouter Verhelst [EMAIL PROTECTED] wrote: Since bash does enable some features that are not specified in POSIX, even when called as /bin/sh, I don't see what the problem would be of installing something else as our default /bin/sh (ignoring the fact That it would break all these

Re: Making init scripts use dash

2006-05-18 Thread Goswin von Brederlow
Michal Politowski [EMAIL PROTECTED] writes: On Thu, 18 May 2006 22:38:08 +0200, Goswin von Brederlow wrote: [...] 3. Make sh an alternative dash already optionally diverts it. Isn't it good enough? When I upload my fash (fast shell) package that would want to divert sh too and then could

Re: Making init scripts use dash

2006-05-18 Thread Matthew R. Dempsky
On Thu, May 18, 2006 at 05:27:00PM -0300, Margarita Manterola wrote: 1. Make /bin/sh point to /bin/dash The biggest problem with this seems to be scripts that expect /bin/sh to point to /bin/bash. Arguably those scripts are broken, but there exists another choice that avoids that unnecessary

Re: Making init scripts use dash

2006-05-18 Thread Henrique de Moraes Holschuh
On Thu, 18 May 2006, Florent Bayle wrote: Why no managing /bin/sh link with update-alternatives ? Because it is essential. -- One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie. -- The

Re: Making init scripts use dash

2006-05-18 Thread Henrique de Moraes Holschuh
On Fri, 19 May 2006, Goswin von Brederlow wrote: Alternatives are more suited for cases where one binary is provided by multiple packages. Currently we have bash, dash, sash, posh. Anything else? Are you prepared to put your life on the line that the alternatives system will never, ever leave

Re: Making init scripts use dash

2006-05-18 Thread David Weinehall
On Thu, May 18, 2006 at 10:38:08PM +0200, Goswin von Brederlow wrote: Margarita Manterola [EMAIL PROTECTED] writes: 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