start-stop daemon

Matthias Benkmann matthias at winterdrache.de
Fri Apr 25 12:40:11 PDT 2003


On 25 Apr 2003 04:30:16 -0700 "Michael A. Peters" <mpeters at mac.com> wrote:

> No it doesn't - give an exit status of 0 on bogus arguments.
> Means it needs more that one line to mean anything.
> 
> #!/bin/bash
> executable=`type -pa "$@" |head -1`
> if [ ! "x$executable" = "x" ]; then
>         echo $executable
> else
>         exit 1
> fi

How about this one instead

#!/bin/bash
type -pa "$@" | head -1 ; exit ${PIPESTATUS[0]}


MSB

-- 
Ambition is a poor excuse for not having enough sense to be lazy.

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list