From owner-freebsd-pkg@freebsd.org Thu Dec 3 14:29:42 2020 Return-Path: Delivered-To: freebsd-pkg@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 24EA54A784B for ; Thu, 3 Dec 2020 14:29:42 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CmysL0cd3z3qGr; Thu, 3 Dec 2020 14:29:42 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (unknown [IPv6:2001:41d0:8:db4c::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id E9E23487; Thu, 3 Dec 2020 14:29:41 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 9CAC4482B4; Thu, 3 Dec 2020 15:29:39 +0100 (CET) Date: Thu, 3 Dec 2020 15:29:39 +0100 From: Baptiste Daroussin To: Stefan Parvu Cc: freebsd-pkg@freebsd.org Subject: Re: FreeBSD 11.4 / 12.2 pkg-install problems startup service Message-ID: <20201203142939.mxk5w6qibsksllcz@ivaldir.net> References: <20201203103544.omchaeelpaaylwll@ivaldir.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pcp4uwoyzkhlobd2" Content-Disposition: inline In-Reply-To: X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2020 14:29:42 -0000 --pcp4uwoyzkhlobd2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 03, 2020 at 01:57:21PM +0200, Stefan Parvu wrote: > >=20 > > That said because we know a lot of people have been doing that for a wh= ile, pkg > > has an option (off by default) HANDLE_RC_SCRIPT > >=20 > > if you set it to true when installing your package it will start the rc= =2Ed script > > so you don't need to install that in your post install script. >=20 > Let me see if I understood this right? Usually, under pkg-install POST ph= ase there could be set some final settings=20 > after the package is extracted and copied to its destination. But placing= startup scripts or calling rc.d scripts from > that POST install phase would not work. Right ? Or does it? That is right, it would not work. >=20 > I am asking because I want to be able to allow users to just say: pkg add= kdr-1.6.2-freebsd11.4-amd64.txz=20 > and thats it. The sfw will install under /opt/kronometrix and all necessa= rily components should start automatically. > For that I was thinking I could use pkg-install POST phase. Do you mean = could I set true the HANDLE_RC_SCRIPT > variable is the pkg-install POST phase or where ? HANDLE_RC_SCRIPT is a user/administrator setting, pkg -o HANDLE_RC_SCRIPT=3Dyes install kdr should do the trick. >=20 > Or do you mean, when I manually pkg add I should set true HANDLE_RC_SCRIP= T from command line for pkg command ? The later With next pkg there would be a possible cheat (workarounding the use of a n= ew feature) to be able to do what you ask for. via triggers Best regards, Bapt --pcp4uwoyzkhlobd2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAl/I9lEACgkQY4mL3PG3 PlqKIw//ZRzix8Ua8w0yu40cUxP6X2P57xXm59DgeY+bHBAW8b6PGdVgKWdKsqwr 2c7sfs1ZlE2v76TTCTAb/r+dlgjms1ah2qLMjIr6epUYb7L1TG2NbcS2K8BKzcaH TWy9wCZX0s6YKhSHnYs4YiGrNqNTWbxyUcr/pCd2fJ7PIvqhd63xJ0kgW/ZkmjKq N0cbXq/ns9IxU8Vu2nHVjAA2DtiwNdwqx2utyVS1IaK0IxrwtR6FVWcwfw+A+wOG zu3EndCEuJA1GrusLPyPTGUcheY9DyUS3683CsEeN3m+sPUE9BobGr1uXJMivVDY SmCbUe5gFE2CuN20p8jjkBplhgp68zoalJriUwHVGpelDxiUC6Uh2dMu61D/WHY5 DRzYo29l3rL/gYNRpZWkAgza+xGfcQ5128ULg64c4Ra3tT2HDMy8TTE7/ZEwnQX8 SSp0WikNQCSo/k8uycjfz0//jDs/AKN+1CvkuBE4yYg5Sa9AARL6D9u9FiZRkocN twXiJhNmBRsvuIoNXaBY8ymjQxySjsnHMo+VK2MzmsivXwf8qpqTRLgM0bLZiC3z Dym05Us1a75dEGhzyQSGX3mjsU4c63lMJusr6CQsH9qJiSFjUAOWeI1NNXPZ1Nyq Yng9roxK1zYnJrffm761zdPeMH+PrV3aQ1I+Wk/7gm5Z0OmhNZo= =QviH -----END PGP SIGNATURE----- --pcp4uwoyzkhlobd2--