summaryrefslogtreecommitdiff
path: root/openrc
Commit message (Collapse)AuthorAgeFilesLines
* openrc/init.d/php-fpm.in.in: don't run eselect during sysinit.Michael Orlitzky2023-07-251-3/+15
| | | | | | | | | | | | | | | | | | | | | | OpenRC caches its dependency tree at boot time, before any non-boot services have started. It does this by sourcing service scripts, which means that running commands in global scope is dangerous because they may not be available yet. In bug 910589 we witness this with a call to eselect in the php-fpm service script, which in turn runs realpath, and can fail: /usr/bin/eselect line 65 /dev/fd/63 No such file or directory /usr/share/eselect/libs/path-manipulations.bash: line 66 realpath : No such file or directory Since there are no dependencies for the php-fpm service, and since no other parts of the service script are cached at that time (source: prayer), the error is harmless. This commit essentially hides it: we now check if the RC_RUNLEVEL is "sysinit" and skip the PHP_SLOT computation if it is. Signed-off-by: Michael Orlitzky <mjo@gentoo.org> Bug: https://bugs.gentoo.org/910589
* Save PHP_SLOT for reuse on stopBrian Evans2021-10-221-1/+8
| | | | | | | | | | | | | Update the php-fpm script to allow the starting slot to be saved. This can then be used by the stop process to track the correct pidfile of what was started. Avoids errors when upgrading the unslotted script from one slot to another. eselect value will change and OpenRC is confused on what to stop as we give it the wrong PID location Signed-off-by: Brian Evans <grknight@gentoo.org>
* autotools: use recursive automake to support out-of-source builds.Michael Orlitzky2020-01-232-0/+20
| | | | | | | | | | | | | | | | When performing an out-of-source build (in particular, with "make distcheck"), the rules that we were using to replace @LIBDIR@ and friends were failing. Automake does a lot of path magic in its rules, but not within the shell commands themselves, so ultimately we wound up with some confusion between the source and build directories. Rather than hack around this problem in the top-level Makefile.am, I've converted the project to a recursive build, where the top-level Makefile.am delegates to Makefile.am in the subdirectories. This over-complicates things, but does fix the out-of-source build. Why? A guess: because the path magic works better in "." than elsewhere. Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
* Use "init.d" and "conf.d" subdirectories of "openrc".Michael Orlitzky2017-07-262-0/+0
| | | | | | | OpenRC's init and conf files need to be named the same, and so we hit problems trying to store them both in the "openrc" directory. This commit puts the conf file in a "conf.d" subdirectory and the init script in an "init.d" subdirectory.
* Rename OpenRC init script and config file.Michael Orlitzky2017-07-252-0/+85
The OpenRC init script is now installed by the Makefile, so to be useful it needs to be called "php-fpm". To that end, I've renamed both the init script and the config file to lack the word "example". Moreover, now that these files are code-like and not documentation-like, I've renamed the directory containing them from "doc" to "openrc".