Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0287aa6588 | ||
|
|
1732c70fb5 | ||
|
|
263dde90c2 | ||
|
|
422795e2ce | ||
|
|
00ad99a292 | ||
|
|
f026c2c541 | ||
|
|
4d20309ffe | ||
|
|
65439ba023 | ||
|
|
86162f3f47 |
76
ChangeLog
76
ChangeLog
@@ -1,3 +1,71 @@
|
||||
commit 1732c70fb5e6d75c0d104662d06169978c00a5e8
|
||||
Author: Doug Freed <dwfreed@mtu.edu>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
rc-schedules: if given nothing to look for, stop
|
||||
|
||||
This avoids trying to kill everything.
|
||||
|
||||
X-Gentoo-Bug: 631958
|
||||
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=631958
|
||||
|
||||
commit 263dde90c28ccd5abb1a60b6ba1f5f8be508164a
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
version 0.34.9
|
||||
|
||||
commit 422795e2ceb723601e648f4f5cde55141c7e02f4
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
Update ChangeLog
|
||||
|
||||
commit 00ad99a29223e1567752191e748822710e1042e6
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
s6 supervisor fixes
|
||||
|
||||
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.
|
||||
|
||||
commit f026c2c541f43eadbaed51b93379fdf56e1f1d0a
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
version 0.34.8
|
||||
|
||||
commit 4d20309ffeb5f0211957bbbc5c875dab434b5079
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
Update ChangeLog
|
||||
|
||||
commit 65439ba023195786e71316f6638b52603e102f60
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
rc_find_pids: namespace fix
|
||||
|
||||
Ignore namespaces if there are errors reading either the pid namespace
|
||||
for the current process or the process we aare testing.
|
||||
|
||||
This fixes https://github.com/openrc/openrc/issues/180.
|
||||
|
||||
commit 86162f3f47c393fc173de0458eeeb322c0bb61f2
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
version 0.34.7
|
||||
|
||||
commit b98e83ee9195eb052fafebc440515f0b2d055a91
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
Update ChangeLog
|
||||
|
||||
commit d59197fafef164fe7319f9d87f544a8cc8e25044
|
||||
Author: William Hubbs <w.d.hubbs@gmail.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
@@ -1593,11 +1661,3 @@ Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
The openntmpfiles package is designed so that it can be used on systems
|
||||
independently of whether openrc is used.
|
||||
|
||||
commit 6414c3bc394f86a5d6a5f02c934469e21bbbc923
|
||||
Author: Jason Zaman <jason@perfinion.com>
|
||||
Commit: William Hubbs <w.d.hubbs@gmail.com>
|
||||
|
||||
selinux: fix SIGSEGV with invalid contexts
|
||||
|
||||
Fixes: https://github.com/openrc/openrc/issues/104
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
NAME= openrc
|
||||
VERSION= 0.34.6
|
||||
VERSION= 0.34.9
|
||||
PKG= ${NAME}-${VERSION}
|
||||
|
||||
@@ -111,9 +111,12 @@ The path to the s6 service directory if you are monitoring this service
|
||||
with S6. The default is /var/svc.d/${RC_SVCNAME}.
|
||||
.It Ar s6_svwait_options_start
|
||||
The options to pass to s6-svwait when starting the service via s6.
|
||||
.It Ar s6_force_kill
|
||||
Should we force-kill this service if s6_service_timeout_stop expires
|
||||
but the service doesn't go down during shutdown? The default is yes.
|
||||
.It Ar s6_service_timeout_stop
|
||||
The amount of time, in milliseconds, s6-svc should wait for the service
|
||||
to go down when stopping the service. The default is 10000.
|
||||
to go down when stopping the service. The default is 60000.
|
||||
.It Ar start_stop_daemon_args
|
||||
List of arguments passed to start-stop-daemon when starting the daemon.
|
||||
.It Ar command
|
||||
|
||||
@@ -39,6 +39,10 @@ s6_service_path - the path to the s6 service directory. The default is
|
||||
s6_svwait_options_start - the options to pass to s6-svwait when starting
|
||||
the service. If this is not set, s6-svwait will not be called.
|
||||
|
||||
s6_force_kill - Should we try to force kill this service if the
|
||||
s6_service_timeout_stop timeout expires when shutting down this service?
|
||||
The default is yes.
|
||||
|
||||
s6_service_timeout_stop - the amount of time, in milliseconds, s6-svc
|
||||
should wait for a service to go down when stopping.
|
||||
|
||||
|
||||
20
sh/s6.sh
20
sh/s6.sh
@@ -12,6 +12,20 @@
|
||||
|
||||
[ -z "${s6_service_path}" ] && s6_service_path="/var/svc.d/${RC_SVCNAME}"
|
||||
|
||||
_s6_force_kill() {
|
||||
local pid
|
||||
s6_service_link="${RC_SVCDIR}/s6-scan/${s6_service_path##*/}"
|
||||
pid="${3%)}"
|
||||
[ -z "${pid}" ] && return 0
|
||||
if kill -0 "${pid}" 2> /dev/null; then
|
||||
ewarn "Sending DOWN & KILL for ${RC_SVCNAME}"
|
||||
s6-svc -dk "${s6_service_link}"
|
||||
sleep 1
|
||||
kill -0 "${pid}" 2>/dev/null && return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
s6_start()
|
||||
{
|
||||
if [ ! -d "${s6_service_path}" ]; then
|
||||
@@ -41,7 +55,11 @@ s6_stop()
|
||||
fi
|
||||
s6_service_link="${RC_SVCDIR}/s6-scan/${s6_service_path##*/}"
|
||||
ebegin "Stopping ${name:-$RC_SVCNAME}"
|
||||
s6-svc -wD -d -T ${s6_service_timeout_stop:-10000} "${s6_service_link}"
|
||||
s6-svc -d -wD -T ${s6_service_timeout_stop:-60000} "${s6_service_link}"
|
||||
set -- $(s6-svstat "${s6_service_link}")
|
||||
[ "$1" = "up" ] &&
|
||||
yesno "${s6_force_kill:-yes}" &&
|
||||
_s6_force_kill "$@"
|
||||
set -- $(s6-svstat "${s6_service_link}")
|
||||
[ "$1" = "down" ]
|
||||
eend $? "Failed to stop ${name:-$RC_SVCNAME}"
|
||||
|
||||
@@ -155,7 +155,7 @@ rc_find_pids(const char *exec, const char *const *argv, uid_t uid, pid_t pid)
|
||||
if (rc <= 0)
|
||||
proc_ns[0] = '\0';
|
||||
}
|
||||
if (strcmp(my_ns, proc_ns))
|
||||
if (strlen(my_ns) && strlen (proc_ns) && strcmp(my_ns, proc_ns))
|
||||
continue;
|
||||
if (uid) {
|
||||
snprintf(buffer, sizeof(buffer), "/proc/%d", p);
|
||||
|
||||
@@ -307,6 +307,9 @@ int run_stop_schedule(const char *applet,
|
||||
const char *const *p;
|
||||
bool progressed = false;
|
||||
|
||||
if (!(pid > 0 || exec || uid || (argv && *argv)))
|
||||
return 0;
|
||||
|
||||
if (exec)
|
||||
einfov("Will stop %s", exec);
|
||||
if (pid > 0)
|
||||
|
||||
Reference in New Issue
Block a user