From owner-freebsd-doc@FreeBSD.ORG Fri Jul 18 14:07:50 2014 Return-Path: Delivered-To: freebsd-doc@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 52726E16; Fri, 18 Jul 2014 14:07:50 +0000 (UTC) Received: from mail-oa0-x22c.google.com (mail-oa0-x22c.google.com [IPv6:2607:f8b0:4003:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9AD22846; Fri, 18 Jul 2014 14:07:49 +0000 (UTC) Received: by mail-oa0-f44.google.com with SMTP id eb12so3200110oac.3 for ; Fri, 18 Jul 2014 07:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=SBbKnwKmcLNmVoEza3CFQ2nlbzC4XyUDM1pYnCdL8l4=; b=JvJjGssTAcLR1mF2zZLPurDubK4x2o9wONv6sLIXBLHa/9qCW7x7mW51O7XfV7x9Zg BbEDli2mkCZUMKiwPPepcfCpWvlF3QrSi1LH4T7dhcsKV62SDWlowHv4yyuM5LCWgs4L tedJRgEc4tLIZUHQFCauuM4Dc9vRd06yXzulqLEi9oz7+9amcMP2d2yiCYgjVLel7Tmp sdFDILRh0PQeEkTdgM9Km8wp0rFtC/uwCEHPK6L4uUVv/kltwNqkle764AA6FStkOqep XQJRfJ4JwUwh5n7Yf4eJdL1Y0DjcwXlMMOGOBWawQwLTTUVkngUe58y07hboUSKafG+I JWig== X-Received: by 10.60.123.66 with SMTP id ly2mr7219037oeb.19.1405692469072; Fri, 18 Jul 2014 07:07:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.132.164 with HTTP; Fri, 18 Jul 2014 07:07:09 -0700 (PDT) In-Reply-To: <20140717205445.GC28314@ivaldir.etoilebsd.net> References: <53C82EC4.8060304@gmail.com> <20140717205445.GC28314@ivaldir.etoilebsd.net> From: Dreamcat4 Date: Fri, 18 Jul 2014 15:07:09 +0100 Message-ID: Subject: Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg? To: Baptiste Daroussin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 Cc: Craig Rodrigues , Adrian Chadd , Navdeep Parhar , freebsd-doc@freebsd.org, freebsd-current Current , Andreas Nilsson , ports X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2014 14:07:50 -0000 On Thu, Jul 17, 2014 at 9:54 PM, Baptiste Daroussin wrote: > On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: > > On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar > wrote: > > > > > On 07/17/14 13:12, Adrian Chadd wrote: > > > > On 17 July 2014 13:03, Alberto Mijares wrote: > > > >> On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd > > > wrote: > > > >>> Hi! > > > >>> > > > >>> 3) The binary packages need to work out of the box > > > >>> 4) .. which means, when you do things like pkg install apache, it > > > >>> can't just be installed and not be enabled, because that's a bit > of a > > > >>> problem; > > > >> > > > >> > > > >> No. Please NEVER do that! The user must be able to edit the files > and > > > >> start the service by himself. > > > > > > > > Cool, so what's the single line command needed to type in to start a > > > > given package service? > > > > > > Aren't sysrc(8) and service(8) for this kind of stuff? > > > > > > > They sure are. > > > > Well, pkg install $service ; sysrc ${service}_enable="YES" would do. > > Although some services have different names than the packge, which is > sort > > of annoying. > > Maybe service needs to be extended (seriously sysrc > ${service}_enable="YES" is > not user friendly) we have service -l that list the services, maybe a > service > This might be a pretty good idea. (barring technical obstacles). > ${service} on that create /etc/rc.conf.d/${service} with > ${service}_enable="YES" > in it and service ${service} off to remove it > I think we should hope for an API / service interface that can try to avoid (as much as it can) to require specifically "rc.conf" file and no other possible way. Because FreeBSD may replace the current rc.d system in future with something else better / next generation. For example the on-going openlaunchd project. That question is more about "when" rather than "if". maybe service -l could also be extended to show the current status (maybe > with a > -v switch) > > but for sure having the service off by default is a good idea :) > It wouldn't hurt very much to have some optional flag to the "pkg install" command that allowed a user to do in 1 command. Then the global configuration of services being installed "off" by default would remain as always. Yet allowing that little extra switch would achieve the stated goal. And help towards FreeBSD being "a slightly more polished OS" that is more user-friendly. Since, you know do the math. It is 1 fewer total commands to type in. Such savings "all adds up". If enough such minor improvement can be made all across the board. Then it makes a difference. > > regards, > Bapt >