Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2018 16:02:52 +0100
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        Larry Rosenman <ler@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:  <20181031150252.p4lhmlaposwurdgr@ogg.in.absolight.net>
In-Reply-To: <201810292328.w9TNSRHm018030@repo.freebsd.org>
References:  <201810292328.w9TNSRHm018030@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--t44gpofmv3dg4bvu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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	(r483436)
> +++ head/mail/dovecot/files/dovecot.in	Mon Oct 29 23:28:26 2018	(r483437)
> @@ -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

Never test for $?.  This should be:

if ${command} ${command_args} -a 2>/dev/null; then

All the rationale in https://github.com/koalaman/shellcheck/wiki/SC2181.


--=20
Mathieu Arnold

--t44gpofmv3dg4bvu
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQKTBAABCgB9FiEEOraXidLtEhBkQLpbOkUW81GDzkgFAlvZxBtfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNB
QjY5Nzg5RDJFRDEyMTA2NDQwQkE1QjNBNDUxNkYzNTE4M0NFNDgACgkQOkUW81GD
zkiTpBAAsIw6JEpciRQb8CeNpvzM4JRd06jRW0IB9wxLlzHYsIKn7+k2ubVLJWO/
AqLAgwCGQcwdPo9B6XWLYY1eFqN+rvdGRJrt/UUE5Gh54YAuHNQ2/mxOIYjKGeRx
BoFj3QFnvnxmEJjC7PoCyq+0P7DiMhU5dteIRz6xnc6hR+AqN6BtvlIbwaMwl+lO
K/BQC315EWv7Di5VXD7BdyBwBodvHF9rBihggdYQb0g4vYIObeQyV8lUIBGIfHGa
H8uv/twkl4VoVmabesqQ3hjRi0wyQriyU3Pm2fIK75bkz1lq3ZqyNgrkbL/8uCvo
oVPTUTDbUKhSZEgl3JBN3qoezrUBkAx/ZNJoAnjGW2JfdMMI2b2M0ugWoiDNXtWL
/5YJCYYby6FPXMH7ldgzrkDcGH0Xk9M9pOdzV09oiWdpZU+ThNK4x6yCO/YQPGAB
HAbKv9EGEyRBBuVYrArW+QCKk2B33FY/irMyvq/8pp561M0PGfDe9lngGe0zOp61
ugNTUjTKSj0iJ07B7C0xhufF+rSixZ6Z6x3rcp5OHIYGTotXAIsrSKlRq2BSzNfE
lb00tvxNFz8wqj7VD9GWT/pTkOBVF01QMNqqTbf9Lfndq9zGpMTV1w+dMXt6zqUF
5pJ7OPUYFSrmkSNqiR5m686DxuzMmpjkZ3c7xcM/m88mTud60b4=
=vetj
-----END PGP SIGNATURE-----

--t44gpofmv3dg4bvu--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181031150252.p4lhmlaposwurdgr>