From owner-freebsd-doc@FreeBSD.ORG Fri Jul 18 19:16:33 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 BAF4A4AB for ; Fri, 18 Jul 2014 19:16:33 +0000 (UTC) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id 8E804255B for ; Fri, 18 Jul 2014 19:16:32 +0000 (UTC) Received: from [192.168.1.2] (senat1-01.HML3.ScaleEngine.net [209.51.186.5]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id A6A66122EB for ; Fri, 18 Jul 2014 19:16:31 +0000 (UTC) Message-ID: <53C972AB.40300@freebsd.org> Date: Fri, 18 Jul 2014 15:16:59 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-doc@freebsd.org Subject: Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg? References: <53C82EC4.8060304@gmail.com> <20140718142835.GF96250@e-new.0x20.net> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hnnfC3VvqdX4WmNFNliGPW6ON2sP21vI6" 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 19:16:33 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hnnfC3VvqdX4WmNFNliGPW6ON2sP21vI6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2014-07-18 15:10, Adrian Chadd wrote: > Hi! >=20 >=20 > On 18 July 2014 07:28, Lars Engels 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=3D"YES" would do= =2E >>> Although some services have different names than the packge, which is= sort >>> of annoying. >> >> I hacked up a solution for service(8): >> >> http://bsd-geek.de/FreeBSD/service.sh.enable-disable.patch >> >> The patch adds the following directives to service(8): >> >> enable: Grabs an rc script's rcvar value and runs "sysrc foo_enable=3D= YES" >> disable: The opposite of enable >> rcdelete: Deletes an rc script's rcvar value from /etc/rc.conf using >> "sysrc -x foo_enable" >> >> The nice thing about is that you can use one of the new directives on >> one line with the old ones, as long as the new are the first argument:= >> >> # service syslogd enable >> # service apache24 disable stop >> # service apache24 rcdelete stop >> # service nginx enable start >> >> >> So after installing a package, to start and enable a daemon permanentl= y >> all you have to run is >> # service foo enable start >> >> Lars >> >> P.S.: Thansk to Devin for his hard work on sysrc! >=20 > Having a way for sysrc and service to know what particular options and > services are exposed by a given package or installed "thing" would be > nice. Right now the namespace is very flat and it's not obvious in all > instances what needs to happen to make it useful and what the options > are. >=20 > "Oh, hm, I'd like to know what options there are for controlling the > installed apache24 package, let's see"... >=20 > I remember IRIX having that command to list services, stop them and > start them, configure them enabled and disabled. Solaris grew > something like that with Solaris 10 and after the initial learning > curve it was great. Hving something like that would be 100% awesome. >=20 >=20 > -a > _______________________________________________ > freebsd-doc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-doc > To unsubscribe, send any mail to "freebsd-doc-unsubscribe@freebsd.org" >=20 This could be as simple as 'service apache24 help' Which would print out all of the possible config vars and guidance on how to use them --=20 Allan Jude --hnnfC3VvqdX4WmNFNliGPW6ON2sP21vI6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTyXKtAAoJEJrBFpNRJZKfkmkQAJN2H1SOAccrbMHEIojaDaao P7JwLjNwrV+zsk7Iue9NnII9DzWR9LAVJjO1ZhhCNTpjzW3MzLgvMCuQh4mkgyrI 8sXw64YaZGe16qc96+wewJKlBaU6SmzcNwhfrReYBA2KkYTOnKa6y8fTaFJAkq9H 60fsfs5u9NYcN3elfSaf+B7QKpLs46ZkuIAFfT0KyDammvMyoUY++VyFVYHdcTpF lcwzT/ODQUI5NUWHJBDfSOwt138UJLevBb6+Pzoju1ymloB+s7840xtrnfH+JeRM uYPXwLhGJZ4T3h+SRoXYobAn8BeV0vlmJ+3SBKxUE8FOWLRnzLU4msVHcTZKw4gL WOo6GqCYhQX/qlfAOX0KtcE4FmCD8OWxEEHTa1evR4xnxLauHGPPCZIelWkRwV+x ODh3ORIvaBSzaEdpaaNDjw8plzsFSvXhDT5Re4sW4LIJ9S3US4gdyczazwdS0oCd FXjoZgDbyGnN4xQauX4mvXmQgf5N4T2rZMSkaqvjn6vXmVXenTjju8r2p4PeBHcx 37kZKcjULeTvExK3nziT2vzE0o7HSBNkxpIgE0BMSxAxytzHYUCEAcu1Ytnjy9xN glq9Gc6l/I3UHTlhz5oqk0i3GBURpMOxSdLXCT6TmXH8P3AQBlUqnx4zzo+EJIH7 so8wgTKz5UVzMlD69QF4 =TYE5 -----END PGP SIGNATURE----- --hnnfC3VvqdX4WmNFNliGPW6ON2sP21vI6--