Date: Thu, 3 Dec 2020 13:34:14 +0200 From: Stefan Parvu <sparvu@kronometrix.org> To: Baptiste Daroussin <bapt@FreeBSD.org> Cc: freebsd-pkg@freebsd.org Subject: Re: FreeBSD 11.4 / 12.2 pkg-install problems startup service Message-ID: <07DB2BAA-F7DF-4BFF-900D-C9E33A51AFF3@kronometrix.org> In-Reply-To: <20201203103544.omchaeelpaaylwll@ivaldir.net> References: <B4DB2170-8F4C-484E-9217-85B92B4753EE@kronometrix.org> <20201203103544.omchaeelpaaylwll@ivaldir.net>
next in thread | previous in thread | raw e-mail | index | archive | help
thanks for message. > I would like to know more about your use cases, it is not recent that = pkg > prevent starting automatically daemon during the install phases, pkg = becomes the > reaper of the scripts it does run and at the end of the run it kills = all the > children process (including any daemon that may have been started). aha. okay that might explain why i dont see anything running after = adding my own package. First of all, the things are something like that: Kronometrix Data = Recording [1] package is a software which collects various performance and availability data from a running system, which = installs under /opt/kronometrix prefix.=20 Under there I have a number of CLI utilities (Perl5 scripts), called = recorders which can run interactively or in background.=20 These CLIs are automatically started via a master script called rec, = found under /opt/kronometrix/etc. I have made the=20 correspondent master rc.d script which will be called during system boot = from /etc/rc.d . It works great.=20 Kronometrix Prefix System Boot /opt/kronometrix/etc/rec /etc/rc.d/kdr Same time, under the same data recording module, I have another script, = which has been designed as a real daemon , written in Perl5 too, with its own startup script = /opt/kronometrix/etc/transport and with a correspondent /etc/rc.d, called kdr_transport=20 Kronometrix Prefix System Boot /opt/kronometrix/etc/transport /etc/rc.d/kdr_transport=20 Now, all sfw is packaged under a FreeBSD binary pkg for easy deployment. = I would like to be able during pkg add phase to start as well the recorders and transport utilities, if possible.=20 What is different? First of all, I made a mistake. This has NOT worked okay before 12.2. = The recorders and transport utilities have never run after pkg add. I had to manually start them. What was different now = with 12.2 is that if I try to install my FreeBSD package, the pkg add gets stuck and requires CTRL-C to break. = Otherwise it will sit like that, forever =E2=80=A6 This is visible under 12.2 and 11.4 - not visible in 12.1 or 11.2 or 10.4 >=20 >=20 > Stopping and starting daemons etc, is not package management in the = first place, > it is configuration management, the two concept are different for a = reason. >=20 > 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 >=20 > 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. Okay. Thanks for tip. Let me try that. Thanks a lot for comments, Stefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?07DB2BAA-F7DF-4BFF-900D-C9E33A51AFF3>