Commit Graph

2944 Commits

Author SHA1 Message Date
William Hubbs
1ccba05658 sh/rc-functions.sh: add need_if_exists convenience function 2017-09-22 17:22:50 -05:00
William Hubbs
c46adf1434 man/openrc-run.8: Clarify the explanation of the need dependency 2017-09-22 16:24:20 -05:00
William Hubbs
1cac8b080c ignore sigchld when shutting down the supervised process
We need to do this to skip the zombie state for the child process since
we are not easily able to wait() for it.
2017-09-18 16:59:18 -05:00
William Hubbs
b58194ef63 typo fix 2017-09-18 13:30:56 -05:00
William Hubbs
b28c0d6f66 typo fix 2017-09-18 13:03:34 -05:00
William Hubbs
3cf19b0f30 supervise-daemon: code cleanup
Clean up the process for killing an active supervisor when stopping.
2017-09-18 12:25:37 -05:00
William Hubbs
0eb47b9af3 initialize the stop schedule 2017-09-18 10:36:17 -05:00
William Hubbs
4ab60ff109 rc-schedules.c: pass the correct pid to rc_find_pids
This is for #163.
2017-09-17 14:20:05 -05:00
Jason Zaman
db4a578273 selinux: fix const qualifier warning
rc-selinux.c: In function ‘selinux_setup’:
rc-selinux.c:361:9: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  curr_t = context_type_get(curr_con);
         ^
2017-09-17 11:41:24 -05:00
Jason Zaman
b1c3422f45 selinux: use openrc contexts path to get contexts
The minimum requirement for libselinux is now >=2.6
The refpolicy and the gentoo policy contain the
contexts since version 2.20170204-r4
2017-09-17 11:40:07 -05:00
William Hubbs
3fafd7a76e sysfs: fix cgroup hybrid mode
In hybrid mode, we should not try to mount cgroup2 if it is not
available in the kernel.

This fixes #164.
2017-09-16 17:02:52 -05:00
William Hubbs
cd5722aca5 cgroup2_find_path: use legacy mode if cgroup2 is not in the kernel
This is related to #164.
2017-09-16 16:49:22 -05:00
William Hubbs
dcb4a4d261 version 0.32 2017-09-16 13:24:52 -05:00
William Hubbs
e312e56997 Update ChangeLog 2017-09-15 15:33:24 -05:00
William Hubbs
2f60a959b4 update news file 2017-09-15 14:25:33 -05:00
William Hubbs
25b45a5a23 cgroup_cleanup: try to remove the cgroup version 2 cgroup
If we were able to kill all the processes in the cgroup, it should be
removed.
2017-09-15 14:22:34 -05:00
William Hubbs
4651b8c7e9 rc-cgroup.sh: cgroup_cleanup fix error handling
cgroup_cleanup should warn if it is unable to clean up all processes in
the control group, but it will always return success.
2017-09-15 13:42:50 -05:00
William Hubbs
50608b54ed rc-cgroup.sh: fix signal names
The "SIG" prefix on signal names passed to kill -s isn't portable.
2017-09-15 13:28:15 -05:00
William Hubbs
b0a077a35f add quiet switch to do_stop in src-schedules.c
This allows supervise-daemon to run this code without attempting to
print some status messages used by start-stop-daemon.
2017-09-14 18:24:39 -05:00
William Hubbs
6a5ca2ab36 make the procedure for killing child processes of services configurable 2017-09-14 16:17:20 -05:00
William Hubbs
2b0345165e Make cgroup_cleanup send only one sigterm and sigkill
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.
2017-09-14 10:55:06 -05:00
William Hubbs
8885580986 rc-cgroup.sh: move cgroup_cleanup to the end of the file 2017-09-14 10:44:52 -05:00
William Hubbs
6d7713a758 guide.md: clarify cgroups documentation
Update the documentation to reflect cgroups version 2 support.
Also, add a section on dealing with orphaned service processes.

This fixes #94.
2017-09-14 10:39:38 -05:00
William Hubbs
457f928e79 add support for control groups version 2
This is for #94.
2017-09-14 10:38:10 -05:00
William Hubbs
a71a461e45 version 0.31 2017-09-07 11:28:09 -05:00
William Hubbs
a09b8af3f9 Update ChangeLog 2017-09-06 17:31:01 -05:00
William Hubbs
382efdbfcb add quiet parameter to run_stop_schedule 2017-09-06 17:22:35 -05:00
William Hubbs
17b5cc78d3 add retry option to supervise-daemon
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.
2017-09-06 17:22:21 -05:00
William Hubbs
36a0ab9054 make run_stop_schedule accept a pid instead of a pid file 2017-08-25 11:36:45 -05:00
William Hubbs
27c2bd997d version 0.30 2017-08-24 11:44:32 -05:00
William Hubbs
d7938f54f2 start-stop-daemon: move --retry processing code to a shared module
This was part of start-stop-daemon; however, it needs to be shared in
order to be used by supervise-daemon.
2017-08-24 11:34:18 -05:00
William Hubbs
cfbe9c2ede move get_pid function to a shared file 2017-08-23 14:36:50 -05:00
William Hubbs
df28002b72 Update ChangeLog 2017-08-16 11:38:37 -05:00
William Hubbs
66ed8082d0 sh/openrc-run: source service script before ulimit is processed
This is needed to allow the service script author to set a default for
rc_ulimit inside the service script.
2017-08-15 17:15:14 -05:00
William Hubbs
c2d256bafb man/openrc-run.8: document fstabinfo and mountinfo
X-Gentoo-Bug: 592374
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=592374
2017-07-26 11:31:34 -05:00
William Hubbs
f48d9c33a5 man/openrc-run.8: document _pre and _post functions
Fixes https://github.com/openrc/openrc/issues/155.
2017-07-25 13:54:12 -05:00
Jason Graham
6d4e843397 fix ENT macro usage
X-Gentoo-Bug: 624796
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=624796
2017-07-24 18:24:18 -05:00
William Hubbs
0513cd3964 version 0.29 2017-07-24 17:28:54 -05:00
John R. Graham
72bb2e57de Typo fix
X-Gentoo-Bug: 624908
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=624908
2017-07-24 17:24:13 -05:00
William Hubbs
84c5da3069 Update ChangeLog 2017-07-13 17:51:02 -05:00
William Hubbs
b35099cb70 Add comment about overriding the default efivars mount in fstab to news 2017-07-13 17:49:25 -05:00
William Hubbs
3fd3bfc76d add link to efivars issue to news file 2017-07-11 15:10:16 -05:00
William Hubbs
492a6303cb Update ChangeLog 2017-07-11 14:57:13 -05:00
William Hubbs
e7807b3136 fix sysvinit compatibility for shutdown wrapper 2017-07-11 14:41:29 -05:00
William Hubbs
03a461ac0e fix sysvinit compatibility for reboot wrapper 2017-07-11 11:53:23 -05:00
William Hubbs
7e0f76e0ad fix sysvinit compatibility for poweroff wrapper 2017-07-11 11:10:46 -05:00
William Hubbs
9812ce5b8d fix halt wrapper so it is sysvinit compatible
This makes the halt wrapper sysvinit compatible. It ignores several
command line switches which are not currently implemented; however,
those can be implemented if we need to do so.

This fixes https://github.com/openrc/openrc/issues/146.
2017-07-10 18:36:24 -05:00
Adam Borowski
12f75e4167 man: fix an unclosed .Bl/.El warning
This fixes #151.
2017-07-07 17:14:31 -05:00
Adam Borowski
260368e010 man: fix missing .Pp warnings
This fixes #151.
2017-07-07 17:13:40 -05:00
William Hubbs
f87a9eec3d init.d/sysfs: mount efivars read only
This fixes #134.
2017-06-13 13:19:36 -05:00