svn commit: r483437 - in head/mail/dovecot: . files

Larry Rosenman ler at FreeBSD.org
Fri Nov 2 21:41:50 UTC 2018


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
> > ==============================================================================
> > --- 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="${config}"
> >  	command_args="-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.
But, for my own interest, what if I want to put out what the return code
is in a message?
> 
> 
> -- 
> Mathieu Arnold



-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640                 E-Mail: ler at lerctr.org
US Mail: 5708 Sabbia Drive, Round Rock, TX 78665-2106
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 679 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20181102/b42134ee/attachment.sig>


More information about the svn-ports-all mailing list