X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4D825F42.3090900@redhat.com> Date: Thu, 17 Mar 2011 13:21:38 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Problems with the new base-files-4.0-5? References: <4D824C56 DOT 9030905 AT alice DOT it> <4D8259FF DOT 4020802 AT alice DOT it> In-Reply-To: <4D8259FF.4020802@alice.it> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigFB6F8630FE7A4448F09BC7E2" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enigFB6F8630FE7A4448F09BC7E2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > Perhaps you need this: >=20 > - ([[ -e ${p} ]] && read -r PRINTER < ${p}) && PRINTER=3D${PRINTER%%,*} > + ([[ -e ${p} ]] && read -r PRINTER < "${p}") && PRINTER=3D${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. --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigFB6F8630FE7A4448F09BC7E2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJNgl9DAAoJEKeha0olJ0NqD4EH/19apUPz5wSkkWcACl3x3WKs xKX5CcJNno+RXN5kR/Oo6yqqls76JMiUrMJqtU3yQ+nXUXmAn+B+c3L6Slw/nH+/ sBNZY6vVjQxD6CnCHBs4hF4OQtyvL+JXJNymZBb+msB5RzyT4d4dAPRVqI7nPgf8 4BwMyWhOu4hGbcEvHJTMgLUYYTyK0p7xEX/GiYZYIbCmRHSkZKGQLjwjbHplKX5W hvwGxmpmUhXz4kMPNsK7Y4+pQFV9zt+1ndFbdN+BGZ0YIsdv4GXh25f1lX9OhbvS N9MbXzRHVAvOVoGcoVgLK28eI0e7ip6hyncLloNu/1Cv7xFOyCqwPS8sR1oPrcA= =NldS -----END PGP SIGNATURE----- --------------enigFB6F8630FE7A4448F09BC7E2--