On Fri, 02 May 2003, James Yonan wrote:

> How do most other initialization scripts handle the differences between bash 1
> and 2?  Do they just restrict themselves to the least common denominator (a)?

Yes. /bin/sh is standardized; Solaris for some strange reason ship
b0rked year-old stuff though (they may need /usr/xpg4/bin/sh -- but
that's a different matter). OTOH, init scripts don't need real
processing work, so getting them to fly with the rotten Solaris /bin/sh
is feasible and should be done. If it works there, it'll most likely
work anywhere else as well :-)

> Or do they try to explicitly instantiate bash2 (b)?
> 
> -#!/bin/sh
> +#!/bin/bash2
> (b) could be risky if there are distros where where /bin/bash2 is not present.

It is indeed harmful, it will actually break SuSE and FreeBSD. I know
systems that don't have bash at all, but just pdksh...

Reply via email to