From owner-freebsd-ports@freebsd.org Mon Sep 14 17:32:40 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB990A03F3C for ; Mon, 14 Sep 2015 17:32:39 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B86831D5C for ; Mon, 14 Sep 2015 17:32:39 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by mailman.ysv.freebsd.org (Postfix) id B56D3A03F3B; Mon, 14 Sep 2015 17:32:39 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BF96A03F3A for ; Mon, 14 Sep 2015 17:32:39 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A33F1D5A for ; Mon, 14 Sep 2015 17:32:39 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: by wicfx3 with SMTP id fx3so149948805wic.1 for ; Mon, 14 Sep 2015 10:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=ehCLqpYy00wRIrmUUpYla6bLE/p67nWTWQ9ml7UaFrU=; b=DeQMVCipOhGL1Ju1U5jJYV8A4XtxnUeJflxA/BSMc19Wf/1JfG37ik1N0nogMGO2Gl 2aWRAn/9CbzEPpG+WutlnRR2/+2PvqGa3Pr9bFWNtHzrAzl78lKymjyM6erEdK5LXnR7 WzWrvdO5qvmk75JYJYqY2V9/7f8RtJd0bxvJf9aaOiRTWD1ZTDm9D4K7wiMoSSDhK5F1 7n8lvH88po+3eVjPQDuZGDRMerN3U/J9uMs8isphh+VVrZrN8ALm0sf2Y1Rs8yF4L2dQ ieysOo79tItOx9S/dWTnHGicjVQTRlkuYnPp03swsXcZbtMRknvxIghVFr9ede6k2xyi gNeg== X-Received: by 10.180.23.71 with SMTP id k7mr28045051wif.11.1442251957752; Mon, 14 Sep 2015 10:32:37 -0700 (PDT) Received: from gumby.homeunix.com ([90.195.198.255]) by smtp.gmail.com with ESMTPSA id n2sm15434160wib.18.2015.09.14.10.32.35 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Sep 2015 10:32:36 -0700 (PDT) Date: Mon, 14 Sep 2015 18:32:30 +0100 From: RW To: ports@freebsd.org Subject: Re: rc script problem - pidfile not being recognised Message-ID: <20150914183230.16681843@gumby.homeunix.com> In-Reply-To: <55f43e74.240f6b0a.25631.0d64SMTPIN_ADDED_MISSING@mx.google.com> References: <20150911161850.402b3d5a@gumby.homeunix.com> <853047065.182.1441986957380.JavaMail.Kevin@Thoth> <20150911171930.59e67cc2@gumby.homeunix.com> <0NUI007RMV24EUD0@hades.sorbs.net> <55F367CF.2080507@sorbs.net> <20150912122759.412ea139@gumby.homeunix.com> <55f43e74.240f6b0a.25631.0d64SMTPIN_ADDED_MISSING@mx.google.com> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2015 17:32:40 -0000 On Sat, 12 Sep 2015 08:02:11 -0700 (PDT) Roger Marquis wrote: > RW via freebsd-ports wrote: > > You'd rather an rc script fails at run-time and shuts down the wrong > > daemon than fail when the script is being developed? > > It's not so much where the script fails than that it fails in the > first place. Neither a pidfile nor a command_interpreter needs to be > required for an rc scripts to work. These are nice features but > making them mandatory is at best a sort of premature optimization. It's not mandatory; you only need to define it if you want to be able to stop an interpreted daemon using the default method. If you have some other way of shutting down a daemon without knowing its name and PID then you can just supply a stop function to do it. > The freebsd rc script environment is already far too OS-specific and > un-editable, often containing no readable shell code at all. That's not been my experience. Occasionally it might a bit harder to customise the script, but that's outweighed by all the times an override can be made cleanly in rc.conf, without having to modify an installed script. I've found that practically all customizations can be done through rc.conf, and the rest usually involve editing an existing stop/start function. And rcng make it easy to keep multiple copies of the same rc file, you can keep separate config and switch between them from rc.conf. > What if > your interpreter changes from say python2.7 to python for example? > Does that mean you have to reinstall all the associated packages or > edit their rc scripts? If the interpreter changes from python2.7 to python, you'd have to change the shebangs anyway.