Re: [PATCH 1/5] Even more dracut functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 11, 2009 at 6:21 PM, Karel Zak <kzak@xxxxxxxxxx> wrote:
>
>  I know, that's nit-picking, but I cannot resist ;-)
>
> On Wed, Feb 11, 2009 at 03:41:56PM -0800, Victor Lowther wrote:
>> +find_binary() {
>> +    local binpath="/bin /sbin /usr/bin /usr/sbin" p
>> +    [[ ${1##*/} = $1 ]] || { echo $1; return 0; }
>> +    for p in $binpath; do
>> +     [[ -x $p/$1 ]] && { echo "$p/$1"; return 0; }
>> +    done
>> +    return 1
>> +}
>
> [...]
>
>> +    local src=$(find_binary "$1") || {
>
>   PATH="/bin:/sbin:/usr/bin:/usr/sbin"
>   local src=$(type -Pa "$1")

What will that do when passed an absolute path to a file that is not
an executable?

>    Karel
>
> --
>  Karel Zak  <kzak@xxxxxxxxxx>
>
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux