Date: Fri, 2 Nov 2018 16:41:47 -0500 From: Larry Rosenman <ler@FreeBSD.org> To: Mathieu Arnold <mat@FreeBSD.org> Cc: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: Re: svn commit: r483437 - in head/mail/dovecot: . files Message-ID: <20181102214147.3j4jf4bdujgaijjp@ler-imac.local> In-Reply-To: <20181031150252.p4lhmlaposwurdgr@ogg.in.absolight.net> References: <201810292328.w9TNSRHm018030@repo.freebsd.org> <20181031150252.p4lhmlaposwurdgr@ogg.in.absolight.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--zaoma6c5uowzsavp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 31, 2018 at 04:02:52PM +0100, Mathieu Arnold wrote: > On Mon, Oct 29, 2018 at 11:28:27PM +0000, Larry Rosenman wrote: > > Modified: head/mail/dovecot/files/dovecot.in > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/mail/dovecot/files/dovecot.in Mon Oct 29 23:25:58 2018 (r48343= 6) > > +++ head/mail/dovecot/files/dovecot.in Mon Oct 29 23:28:26 2018 (r48343= 7) > > @@ -60,6 +60,14 @@ for config in ${dovecot_config}; do > > required_files=3D"${config}" > > command_args=3D"-c ${config}" > > if [ -s ${config} ]; then > > + ${command} ${command_args} -a 2>/dev/null > > + if [ $? -ne 0 ]; then >=20 > Never test for $?. This should be: >=20 > if ${command} ${command_args} -a 2>/dev/null; then >=20 > All the rationale in https://github.com/koalaman/shellcheck/wiki/SC2181. But, for my own interest, what if I want to put out what the return code is in a message? >=20 >=20 > --=20 > Mathieu Arnold --=20 Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106 --zaoma6c5uowzsavp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHBBAABCgCrFiEEHjgknedhWzvJgwVzaXyZsatIp30FAlvcxJstFIAAAAAAFQAP cGthLWFkZHJlc3NAZ251cGcub3JnbGVyQEZyZWVCU0Qub3JnXxSAAAAAAC4AKGlz c3Vlci1mcHJAbm90YXRpb25zLm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxRTM4 MjQ5REU3NjE1QjNCQzk4MzA1NzM2OTdDOTlCMUFCNDhBNzdEAAoJEGl8mbGrSKd9 DKoIAKS0/dx7jo6u73V59Aw+XTBTKv1bXGZaC060eCOCuArsa0HDjau4uufwBwpQ fx6XX75+gu2tbM6k2myK6zccG0gf+Ng6imkBUsnr4Y5spkwz8m20v0jjeYSjkjr4 Uygy+uh33U2vv0D00CXte4nrOMON2wHX2+LbDv8Auysu8OII0h+/nfTzQ6u8QgIn n8fn1tRZcEffuIa1ctsSJ93/tFYVif47Ov/4Z9FOYd9LSKAIP2O5i3GldtHDUW/g MdH/pRAPuZZVzJPYzyo0LIZnuFDbxgdnHVYDgLEop/+T0HiKBCT6dG8ZzyhrjABP X+rPmJUjqSXH8ptLC0gN5lUxKIA= =xqYp -----END PGP SIGNATURE----- --zaoma6c5uowzsavp--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181102214147.3j4jf4bdujgaijjp>