From owner-freebsd-questions@freebsd.org Thu Dec 17 14:03:49 2015 Return-Path: Delivered-To: freebsd-questions@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 37B7EA4AFC1 for ; Thu, 17 Dec 2015 14:03:49 +0000 (UTC) (envelope-from vsasjason@gmail.com) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (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 CA8E41CAF for ; Thu, 17 Dec 2015 14:03:48 +0000 (UTC) (envelope-from vsasjason@gmail.com) Received: by mail-wm0-x22c.google.com with SMTP id l126so24905690wml.1 for ; Thu, 17 Dec 2015 06:03:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fkpG54bvRi8Y9oV0EBxYpq2O2scEQNJqVMLW5H/H/p8=; b=ACvWmLgyRTW2yp+I0wchaawvKgHFpPQpzkUkY2bBnoJIvRKcv+ohFAGE3stISy90QN gjrrVOOYGu+xAL7hEOfQnbo9wxj/UDt0KYxQjzYitRN8QSR2Ov8rEkB2E7CqFNkfcY8F pBaGjKYKo7+5z4khjmuLDWWjs4XHqMN4sKC0nev6un9FeWRp7k2pdOQth47jpQBphSJp bwYw3Stu59fuXQMeY2xM7/zRDN+TIJ3kVvMg4fR9OvA22YfwaLKzE4gLvFk5f4xShSEJ HWNVMdnNra857jQ/CErie1wlBCDDrVhjeX4xrzRBnRQuI4N/BNU8+f9mmBLrM/mjhh1w f+1A== MIME-Version: 1.0 X-Received: by 10.28.226.86 with SMTP id z83mr4542384wmg.77.1450361026156; Thu, 17 Dec 2015 06:03:46 -0800 (PST) Received: by 10.194.76.207 with HTTP; Thu, 17 Dec 2015 06:03:45 -0800 (PST) Received: by 10.194.76.207 with HTTP; Thu, 17 Dec 2015 06:03:45 -0800 (PST) In-Reply-To: <20151217135221.GB1545@geeks.org> References: <20151217135221.GB1545@geeks.org> Date: Thu, 17 Dec 2015 17:03:45 +0300 Message-ID: Subject: Re: Best way to start pkg daemons that don't come with their own rc script From: Anton Sayetsky To: Doug McIntyre Cc: FreeBSD Questions Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2015 14:03:49 -0000 17 =D0=B4=D0=B5=D0=BA. 2015 =D0=B3. 15:59 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0= =BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C "Doug McIntyre" =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > > So, for the concrete example. > > FreeBSD10.2 > I want to run ntp-devel > > So I install it out of pkg and it goes into /usr/local. > > But it doesn't supply a /usr/local/etc/rc.d/ntpd rc script. > Presumably because /etc/rc.d/ntpd already exists for the system > installed ntpd. > > What I tried was to move the ntpd rc out of /etc into /usr/local/etc > and change the 'command' to /usr/local/sbin/${name} > > BUT, the rc.subr code pretty much overrides that to run /usr/sbin/${name} > anyway. > > Since ntpd is part of the base system, I feel stymied. > > I did a hack to make it work. > > But what would be the "proper FreeBSD way" to have the rc script run > the right binary here? If you need to run software that is installed from ports and exists in the base too, take a look at /etc/defaults/rc.conf. For example, you should only add ntpd_program=3D"/usr/local/sbin/ntpd" in rc.conf.