Age | Commit message (Collapse) | Author |
|
Remove the IFS manipulation and simplify the loop that processes the
settings.
|
|
Some initramfs mount /run which then ends up with the wrong labels.
Force relabel all of /run right after its mounted to fix.
|
|
/dev/console is relabelled later in the devfs init script, but by then we
have already missed some of the messages, so fix that label early.
|
|
The current check only tries to detect whether /sys/fs/cgroup exists and
whether it is writable or not. But when the init system doesn't mount
cgroups then /sys/fs/cgroup will just be an empty directory. When paired
with unprivileged containers that mount sysfs this will cause misleading
errors to be printed since /sys/fs/cgroup will be owned by user
nobody:nogroup in this case. Independent of this specific problem this
check will also be misleading when the /sys/fs/cgroup exists and is in
fact writable by the init system but isn't actually a mountpoint.
Note from William. "grep -qs" doesn't need to redirect output to
/dev/null since it is completely silent.
This fixes #209.
|
|
This function should only be called once and it does not take any
arguments.
X-Gentoo-Bug: 639166
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=639166
|
|
Add the following variables to expose more arguments that can be passed
to start-stop-daemon or supervise-daemon:
- directory will be passed to --chdir
- error_log will be passed to --stderr
- output_log will be passed to --stdout
- umask will be passed to umask
This is for #184.
|
|
Add the ability to force-kill a service if it does not go down
successfully. Also, adjust the default wait time for an s6 service to go
down to 60 seconds.
|
|
This makes ps show which service the supervisor is monitoring.
|
|
The unsupervised status is to be used when a supervisor of a supervised
service dies but leaves the service daemon itself running.
|
|
|
|
- do not sleep for the full 90 seconds if processes are dead
- re-arrange the order of signals we attempt to send to the processes
|
|
This is to be used if the service is being supervised and the
supervisor is somehow killed.
Currently, this is very linux specific, but I will expand to other
platforms, patches are welcome.
|
|
This makes the cgroups handling consistent between cgroups v1 and v2.
Also, it fixes #167.
|
|
|
|
This is related to #164.
|
|
If we were able to kill all the processes in the cgroup, it should be
removed.
|
|
cgroup_cleanup should warn if it is unable to clean up all processes in
the control group, but it will always return success.
|
|
The "SIG" prefix on signal names passed to kill -s isn't portable.
|
|
|
|
Instead of looping and sending multiple signals to child processes in
cgroup_cleanup, we send sigterm followed by sleeping one second then
sigkill.
This brings us more in line with systemd's "control group" killmode
setting.
Also, this commit includes several shellcheck cleanups.
|
|
|
|
This is for #94.
|
|
The --retry option for supervise-daemon defines how the supervisor will
attempt to stop the child process it is monitoring. It is defined when
the supervisor is started since stopping the supervisor just sends a
signal to the active supervisor.
This fixes #160.
|
|
This is needed to allow the service script author to set a default for
rc_ulimit inside the service script.
|
|
This creates --respawn-delay, --respawn-max and --respawn-period. It was
suggested that it would be easier to follow if the options were
separated.
This is for #126.
|
|
Allow limiting the number of times supervise-daemon will attempt to respawn a
daemon once it has died to prevent infinite respawning. Also, set a
reasonable default limit (10 times in a 5 second period).
This is for issue #126.
|
|
We do not need to care about the path on the shebang line of a service
script as long as the shebang line ends with "openrc-run".
This fixes #119 and #120.
|
|
|
|
This script only runs on Linux, so the check will always be false.
|
|
This will also warn users if md5sum is missing, which serves as a pretty
good indicator that /usr is not mounted.
|
|
Supervisor setups break easily when start/stop/status functions are not
default.
Applications that write multiple PIDs to a pidfile (eg HAProxy as
described in bug 601540), can also benefit from being able to call the
default start/stop/status with modified environment variables.
Expose the default start/stop/status functions as
default_start/stop/status, and use them for the defaults
start/stop/status.
Trivial usage example:
```
stop()
{
t=$(mktemp)
for pid in $(cat $pidfile) ; do
echo $pid >$t
pidfile=$t default_stop
done
rm -f $t
}
```
X-Gentoo-Bug: 601540
X-Gentoo-Bug-URL: https://bugs.gentoo.org/601540
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
Fixes #99
|
|
The openntmpfiles package is designed so that it can be used on systems
independently of whether openrc is used.
|
|
This allows us to avoid the warnings from bash-4.4 about null bytes in
command substitutions.
If you have separate /usr, are not using an initramfs, and have a file
called /proc/self/environ on your root file system, this will break.
X-Gentoo-Bug: 594534
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=594534
|
|
This reverts commit 0d1f1010c299a95332f224c3be9e8dfdd85eec54.
We need the eval in case someone uses something like:
command_args="this \"is a\" test"
This is related to #77.
|
|
This fixes #77.
|
|
If this is set to yes, 1, true, or on, start-stop-daemon will display a
progress meter while waiting for a daemon to stop.
|
|
This is needed because containers may give read access to cgroups but
not allow the settings to be changed.
|
|
This fixes #79.
|
|
This fixes the test for cache restoration since we are no longer caching
the dependency tree.
|
|
X-Gentoo-Bug: 503134
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=503134
|
|
X-Gentoo-Bug: 501364
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=501364
|
|
btrfs support is not implemented yet (for q Q v), but at least tmpfiles.sh
no longer chokes about tmpfiles.d lines of recent systemd versions
This fixes #87.
|
|
This brings us closer to being able to use tmpfiles.sh as a full
replacement for systemd-tmpfiles.
This closes #83.
|
|
This is part of #83.
|
|
This is part of #83.
|
|
|
|
The support for the chroot variable was broken in 0.16, this fixes that
breakage.
|
|
The supervise-daemon process is meant to be a lightweight supervisor
which can monitor and restart a daemon if it crashes.
|
|
The read builtin in most shells will interpret backslash characters
as escapes, and they are lost when reading binfmt files line-by-line.
This causes magic strings containing backslashes to be mangled and
become invalid, resulting in erroneous 'invalid entry' messages.
The -r option to read disables special handling of backslashes and
keeps all lines intact.
X-Gentoo-Bug: 575114
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=575114
|