FreeBSD 11.4 / 12.2 pkg-install problems startup service
Baptiste Daroussin
bapt at FreeBSD.org
Thu Dec 3 14:29:42 UTC 2020
On Thu, Dec 03, 2020 at 01:57:21PM +0200, Stefan Parvu wrote:
> >
> > That said because we know a lot of people have been doing that for a while, pkg
> > has an option (off by default) HANDLE_RC_SCRIPT
> >
> > if you set it to true when installing your package it will start the rc.d script
> > so you don't need to install that in your post install script.
>
> Let me see if I understood this right? Usually, under pkg-install POST phase there could be set some final settings
> 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.
>
> 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
> and thats it. The sfw will install under /opt/kronometrix and all necessarily 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=yes install kdr
should do the trick.
>
> Or do you mean, when I manually pkg add I should set true HANDLE_RC_SCRIPT from command line for pkg command ?
The later
With next pkg there would be a possible cheat (workarounding the use of a new
feature) to be able to do what you ask for. via triggers
Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20201203/24aeed1f/attachment.sig>
More information about the freebsd-pkg
mailing list