Compare commits
20 Commits
openrc-0.1
...
openrc-0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f7351cf7f | ||
|
|
52220d5df1 | ||
|
|
d5dfc6d529 | ||
|
|
7f33410e5d | ||
|
|
56993950f2 | ||
|
|
e3999c15ad | ||
|
|
4a9c450ec2 | ||
|
|
bb4c14999c | ||
|
|
252422dcf0 | ||
|
|
a3a64ac94e | ||
|
|
1a2f45a4c5 | ||
|
|
34b55f31b3 | ||
|
|
e0c746e938 | ||
|
|
50329eee7a | ||
|
|
fb81028121 | ||
|
|
50e99aa30a | ||
|
|
b177b79242 | ||
|
|
7009f66872 | ||
|
|
2eb0ea9afb | ||
|
|
534031fc7a |
@@ -1,3 +1,3 @@
|
||||
NAME= openrc
|
||||
VERSION= 0.13.5
|
||||
VERSION= 0.13.10
|
||||
PKG= ${NAME}-${VERSION}
|
||||
|
||||
@@ -14,12 +14,13 @@ start()
|
||||
{
|
||||
ebegin "Starting local"
|
||||
|
||||
local file has_errors=0 retval
|
||||
local file has_errors=0 redirect retval
|
||||
yesno $rc_verbose || redirect='> /dev/null 2>&1'
|
||||
eindent
|
||||
for file in @SYSCONFDIR@/local.d/*.start; do
|
||||
if [ -x "${file}" ]; then
|
||||
vebegin "Executing \"${file}\""
|
||||
"${file}" 2>&1 >/dev/null
|
||||
"${file}" $redirect
|
||||
retval=$?
|
||||
if [ ${retval} -ne 0 ]; then
|
||||
has_errors=1
|
||||
@@ -52,12 +53,13 @@ stop()
|
||||
{
|
||||
ebegin "Stopping local"
|
||||
|
||||
local file has_errors=0 retval
|
||||
local file has_errors=0 redirect retval
|
||||
yesno $rc_verbose || redirect='> /dev/null 2>&1'
|
||||
eindent
|
||||
for file in @SYSCONFDIR@/local.d/*.stop; do
|
||||
if [ -x "${file}" ]; then
|
||||
vebegin "Executing \"${file}\""
|
||||
"${file}" 2>&1 >/dev/null
|
||||
"${file}" $redirect
|
||||
retval=$?
|
||||
if [ ${retval} -ne 0 ]; then
|
||||
has_errors=1
|
||||
|
||||
@@ -7,7 +7,7 @@ description="Mounts network shares according to /etc/fstab."
|
||||
depend()
|
||||
{
|
||||
config /etc/fstab
|
||||
use afc-client amd autofs openvpn
|
||||
use afc-client amd nfsclient autofs openvpn
|
||||
use dns
|
||||
keyword -jail -prefix -vserver -lxc
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ depend()
|
||||
start()
|
||||
{
|
||||
ebegin "setting up tmpfiles.d entries for /dev"
|
||||
@LIBEXECDIR@/sh/tmpfiles.sh --prefix=/dev --create ${tmpfiles_opts}
|
||||
@LIBEXECDIR@/sh/tmpfiles.sh --prefix=/dev --create --boot ${tmpfiles_opts}
|
||||
eend $?
|
||||
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=full > 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 */
|
||||
|
||||
@@ -133,6 +133,10 @@ static int do_check(char *path, uid_t uid, gid_t gid, mode_t mode,
|
||||
}
|
||||
|
||||
if (mode && (st.st_mode & 0777) != mode) {
|
||||
if ((type != inode_dir) && (st.st_nlink != 1)) {
|
||||
eerror("%s: chmod: %s %s", applet, "Too many hard links to", path);
|
||||
return -1;
|
||||
}
|
||||
einfo("%s: correcting mode", path);
|
||||
if (chmod(path, mode)) {
|
||||
eerror("%s: chmod: %s", applet, strerror(errno));
|
||||
@@ -141,6 +145,10 @@ static int do_check(char *path, uid_t uid, gid_t gid, mode_t mode,
|
||||
}
|
||||
|
||||
if (chowner && (st.st_uid != uid || st.st_gid != gid)) {
|
||||
if ((type != inode_dir) && (st.st_nlink != 1)) {
|
||||
eerror("%s: chown: %s %s", applet, "Too many hard links to", path);
|
||||
return -1;
|
||||
}
|
||||
einfo("%s: correcting owner", path);
|
||||
if (chown(path, uid, gid)) {
|
||||
eerror("%s: chown: %s", applet, strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user