On Sat, Jul 9, 2016 at 11:37 PM, Frank Scheiner <[email protected]> wrote:
> On 07/10/2016 03:36 AM, Todd C. Miller wrote:
...
>> We can simplify the check and simply treat a value of "??" as
>> non-local and skip the reorder.
...
>> --- rc  29 May 2016 15:36:06 -0000      1.485
>> +++ rc  10 Jul 2016 01:35:46 -0000
>> @@ -164,8 +164,8 @@ reorder_libs() {
>>         local _dkdev=/dev/$(stat -L -f '%Sd' /usr/lib)
>>         local _mp=$(mount | grep "^$_dkdev")
>>
>> -       # Skip if /usr/lib is on a nfs mounted filesystem.
>> -       [[ $_mp == *' type nfs '* ]] && return
>> +       # Skip if /usr/lib is not on a local filesystem.
>> +       [ $_dkdev == '??' ] && return
...
> I just ran the line where _dkdev is set and when using the resulting value
> with e.g. `echo` it looks like the "??" is expanded by the shell if $_dkdev
> is not enclosed in double quotes. This also seems to happen for the test
> clause:

Yeah, that's one of the reasons to use [[ ... ]] instead of [ .. ].


> # [ $_dkdev == '??' ]
> ksh: [: /dev/pf: unexpected operator/operand

Try:
   [[ $_dkdev == '??' ]]

Note the '??' must remain quoted so that they *aren't* a globbing
pattern for [[ .. ]]'s more powerful == operator...


Philip Guenther

Reply via email to