Salut,

On Tue, 2006-11-14 at 05:02 -0800, davej wrote:
> ------------------------------------
> if [ -e /usr/bin/bash ]
>  exec /usr/bin/bash
>  exit
> fi
> ------------------------------------

Two notes here:

1. you're not passing on any arguments. These lines should look rather
like this:

if [ -e /usr/bin/bash ]
then
        exec /usr/bin/bash "$@"
fi

2. exec already overwrites the process so exit is only going to be
reached in case of error, in which it might be better to return an error
or whatever:

if [ -e /usr/bin/bash ]
then
        exec /usr/bin/bash "$@"
        ret=$?
        echo "Failed to execute bash: ${ret}"
        exit ${ret}
fi

                                Tonnerre
-- 
SyGroup GmbH
Tonnerre Lombard

Lösungen mit System
Tel:+41 61 333 80 33    Röschenzerstrasse 9
Fax:+41 61 383 14 67    4153 Reinach BL
Web:www.sygroup.ch      [EMAIL PROTECTED]

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to