Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Feb 2014 18:24:58 +0100
From:      Benjamin Podszun <benjamin.podszun@gmail.com>
To:        ports <ports@freebsd.org>
Subject:   dovecot, init script - is this expected or PR worthy?
Message-ID:  <CAJOeo-1o%2BUDso9i6rtbAyTdpSCp8n3DhyVWq2ir5iNec3HoEFg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hey there.

Setting up a machine with ansible, stumbling upon a couple of problems. The
current issue? Part of my automated setup calls

service dovecot start

and .. that succeeds always, if dovecot_enable="YES" is missing (which
totally is an error on my part, obviously).

What I expect though is the typical "Can't do that, Dave. Try onestart
perhaps" response - and some exit code that signals failure.

Dovecot's init script wraps all the standard rc stuff in this if though:

if checkyesno ${name}_enable; then
        for config in ${dovecot_config}; do
                required_files="${config}"
                command_args="-c ${config}"
                base_dir=$(${command} ${command_args} -a | /usr/bin/awk -F
'= ' '/^base_dir =/ { print $2 }')
                pidfile="${base_dir}/master.pid"
                run_rc_command "$1"
        done
fi

=> checkyesno returns false, script silently exits and 'service dovecot
start' seemingly succeeded, no message given. Looking at other services at
least a message appears (but the exit code is still 0):

service unbound start
Cannot 'start' unbound. Set unbound_enable to YES in /etc/rc.conf or use
'onestart' instead of 'start'.

Is that a (tiny, minor) bug? Should I submit a PR for that? Or is that
totally irrelevant and people out there would never fall for that anyway..?

Thanks,
Ben



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJOeo-1o%2BUDso9i6rtbAyTdpSCp8n3DhyVWq2ir5iNec3HoEFg>