Am Mittwoch, 6. September 2006 23:08 schrieb Gilles Chanteperdrix:
> Niklaus Giger wrote:
>  > Hi
>  >
>  > Since the last checkin in xeno-load.in by gpm on the 17 of July my PPC
>  > HCU3 target does not run the xeno-tests correctly.
>  > E.g. in
>  > http://ngiger.dyndns.org/buildbot/hcu3_q/builds/26/step-xenotest/0 you
>  > find lines like
>  > /usr/xenomai/bin/xeno-load: /usr/xenomai/bin/xeno-load: 249: sudo: not
>  > found
>  >
>  > My earlier solution was:
>  > if test -n "`which sudo`"; then
>  >   sudo=`which sudo`
>  > fi
>  >
>  > This was corrected by Gilles to
>  >
>  > >if test -n "`which sudo 2>/dev/null`"; then
>  > >  sudo=`which sudo`
>  > >elif test -n "`type -t sudo 2>/dev/null`"; then
>  > >  sudo=sudo
>  > >fi
>  >
>  > Unfortunately my busybox version 1.1.3 behaves like this:
>  > >~ $ type -t sudo 2>/dev/null
>  > >-t: not found
>  > >sudo: not found
>
> What about:
>
> if type sudo > /dev/null 2>&1; then
>     sudo=sudo
> fi
Works fine for me under bash and busybox.

Thanks

-- 
Niklaus Giger

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to