Problems with the new base-files-4.0-5?
Eric Blake
eblake@redhat.com
Thu Mar 17 19:39:00 GMT 2011
On 03/17/2011 12:59 PM, Angelo Graziosi wrote:
> Il 17/03/2011 19.00, Angelo Graziosi ha scritto:
>> I have just updated Cygwin, and now starting a console (Cygwin.bat or
>> MinTTY) prints:
>>
>> -bash: ${p}: ambiguous redirect
>>
>> and PRINTER variable isn't set.
>>
>> Reverting to base-files-4.0-4 works just fine and PRINTER is set
>> correctly to my default printer.
>>
>> In 4.0-5 it seems something is broken in /etc/profile.
>
> Perhaps you need this:
>
> - ([[ -e ${p} ]] && read -r PRINTER < ${p}) && PRINTER=${PRINTER%%,*}
> + ([[ -e ${p} ]] && read -r PRINTER < "${p}") && PRINTER=${PRINTER%%,*}
/etc/profile is using [[ ]]? Bad. That's not required by POSIX, and
will break for anyone who logs in with a shell that doesn't understand
it (for example, dash or posh). Bashisms should not appear in /etc/profile.
--
Eric Blake eblake@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20110317/bc8849a0/attachment.sig>
More information about the Cygwin
mailing list