From owner-freebsd-ports@FreeBSD.ORG Tue Feb 11 17:25:00 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4922C5F4 for ; Tue, 11 Feb 2014 17:25:00 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D5B1D195B for ; Tue, 11 Feb 2014 17:24:59 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id e4so4817373wiv.11 for ; Tue, 11 Feb 2014 09:24:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=/avPTGLgmB4szZVUlGoMh4QEsFBs0z/7272mQ2AQfj0=; b=fmZ1ug827cIyVNTDO1M7Dz+ST5jULH80yKAsIhhCkoCNO2vXAzjp72ZwFlL+yxpFN0 6N46kgu/AoemdUD94KGbccPeutkMOWLKIPltluWq13/iU5MT7/qC0CpR/LHVI1RCcHCv rVS0zw9GgqaL91LUjHz3/3dMGQc4knE+EORv+E75Qf87sKOvwGzNUCVg001Ck4ovtw5N SauiNVH9dt6qoKXUTjvXOuI2qqrlB2HvTqxfOLMLiEdIuLkU3RizRSVTomv1T2ZNpxmn E8kPCMWF9MQW0enDZwUhi83FlMLgEtfjVNQfQBIgaB6+tjbSqp2P+90C+dqtHyvfzWpv 3v3A== MIME-Version: 1.0 X-Received: by 10.180.98.71 with SMTP id eg7mr15417909wib.31.1392139498225; Tue, 11 Feb 2014 09:24:58 -0800 (PST) Received: by 10.194.188.39 with HTTP; Tue, 11 Feb 2014 09:24:58 -0800 (PST) Date: Tue, 11 Feb 2014 18:24:58 +0100 Message-ID: Subject: dovecot, init script - is this expected or PR worthy? From: Benjamin Podszun To: ports Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 17:25:00 -0000 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