Compare commits
8 Commits
openrc-0.1
...
openrc-0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0c746e938 | ||
|
|
50329eee7a | ||
|
|
fb81028121 | ||
|
|
50e99aa30a | ||
|
|
b177b79242 | ||
|
|
7009f66872 | ||
|
|
2eb0ea9afb | ||
|
|
534031fc7a |
@@ -1,3 +1,3 @@
|
||||
NAME= openrc
|
||||
VERSION= 0.13.5
|
||||
VERSION= 0.13.7
|
||||
PKG= ${NAME}-${VERSION}
|
||||
|
||||
@@ -113,7 +113,8 @@ mount_cgroups()
|
||||
yesno ${rc_controller_cgroups:-YES} && [ -e /proc/cgroups ] || return 0
|
||||
while read name hier groups enabled rest; do
|
||||
case "${enabled}" in
|
||||
1) mkdir /sys/fs/cgroup/${name}
|
||||
1) mountinfo -q /sys/fs/cgroup/${name} && continue
|
||||
mkdir /sys/fs/cgroup/${name}
|
||||
mount -n -t cgroup -o ${sysfs_opts},${name} \
|
||||
${name} /sys/fs/cgroup/${name}
|
||||
;;
|
||||
@@ -129,25 +130,13 @@ restorecon_sys()
|
||||
restorecon -rF /sys/fs/cgroup >/dev/null 2>&1
|
||||
eend $?
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
local retval
|
||||
mount_sys
|
||||
retval=$?
|
||||
if [ $retval -eq 0 ]; then
|
||||
mount_misc
|
||||
retval=$?
|
||||
fi
|
||||
if [ $retval -eq 0 ]; then
|
||||
mount_cgroups
|
||||
retval=$?
|
||||
fi
|
||||
|
||||
mount_misc
|
||||
mount_cgroups
|
||||
restorecon_sys
|
||||
|
||||
return $retval
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -8,12 +8,17 @@ DISTFILE?= ${DISTPREFIX}.tar.bz2
|
||||
|
||||
CLEANFILES+= ${NAME}-*.tar.bz2
|
||||
|
||||
CHANGELOG_LIMIT?= --after="1 year ago"
|
||||
|
||||
_SNAP_SH= date -u +%Y%m%d%H%M
|
||||
_SNAP:= $(shell ${_SNAP_SH})
|
||||
SNAP= ${_SNAP}
|
||||
SNAPDIR= ${DISTPREFIX}-${SNAP}
|
||||
SNAPFILE= ${SNAPDIR}.tar.bz2
|
||||
|
||||
changelog:
|
||||
git log ${CHANGELOG_LIMIT} --format=medium > ChangeLog
|
||||
|
||||
dist:
|
||||
git archive --prefix=${DISTPREFIX}/ ${GITREF} | bzip2 > ${DISTFILE}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Copyright (c) 2012 Alexander Vershilov <qnikst@gentoo.org>
|
||||
# Released under the 2-clause BSD license.
|
||||
extra_stopped_commands="${extra_stopped_commands} cgroup_cleanup"
|
||||
description_cgroup_cleanup="Kill all processes in the cgroup"
|
||||
|
||||
cgroup_find_path()
|
||||
{
|
||||
|
||||
@@ -560,22 +560,20 @@ rc_service_daemons_crashed(const char *service)
|
||||
spidfile = xmalloc(strlen(ch_root) + strlen(pidfile) + 1);
|
||||
strcpy(spidfile, ch_root);
|
||||
strcat(spidfile, pidfile);
|
||||
free(pidfile);
|
||||
pidfile = spidfile;
|
||||
}
|
||||
|
||||
pid = 0;
|
||||
if (spidfile) {
|
||||
if (pidfile) {
|
||||
retval = true;
|
||||
if ((fp = fopen(spidfile, "r"))) {
|
||||
if ((fp = fopen(pidfile, "r"))) {
|
||||
if (fscanf(fp, "%d", &pid) == 1)
|
||||
retval = false;
|
||||
fclose(fp);
|
||||
}
|
||||
free(spidfile);
|
||||
spidfile = NULL;
|
||||
if (ch_root) {
|
||||
free(pidfile);
|
||||
pidfile = NULL;
|
||||
}
|
||||
free(pidfile);
|
||||
pidfile = NULL;
|
||||
|
||||
/* We have the pid, so no need to match
|
||||
on exec or name */
|
||||
|
||||
Reference in New Issue
Block a user