This repository has been archived by the owner on Apr 15, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
- Loading branch information
Showing
5 changed files
with
69 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SUBDIRS = bsd systemd sysvinit upstart | ||
SUBDIRS = bsd systemd sysvinit upstart openrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
EXTRA_DIST = cgmanager cgproxy | ||
|
||
if INIT_SCRIPT_OPENRC | ||
RC_INIT_DIR = $(sysconfdir)/init.d | ||
|
||
install-openrc: cgmanager cgproxy | ||
$(MKDIR_P) $(DESTDIR)$(RC_INIT_DIR) | ||
$(INSTALL_DATA) cgmanager $(DESTDIR)$(RC_INIT_DIR)/ | ||
$(INSTALL_DATA) cgproxy $(DESTDIR)$(RC_INIT_DIR)/ | ||
|
||
uninstall-openrc: | ||
rm -f $(DESTDIR)$(RC_INIT_DIR)/cgmanager | ||
rm -f $(DESTDIR)$(RC_INIT_DIR)/cgroxy | ||
rmdir $(DESTDIR)$(RC_INIT_DIR) || : | ||
|
||
install-data-local: install-openrc | ||
uninstall-local: uninstall-openrc | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 1999-2015 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
description="Control Group manager daemon" | ||
pidfile="/run/cgmanager.pid" | ||
command="/usr/sbin/cgmanager" | ||
command_args="-m name=systemd" | ||
command_background="yes" | ||
retry="TERM/45" | ||
|
||
depend() { | ||
before cgproxy | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 1999-2015 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
description="Control Group manager proxy" | ||
pidfile="/run/cgproxy.pid" | ||
command="/usr/sbin/cgproxy" | ||
command_args="--daemon" | ||
command_background="yes" | ||
retry="TERM/45" | ||
NESTED="${NESTED:-no}" | ||
|
||
depend() { | ||
after cgmanager | ||
} | ||
|
||
start_pre() { | ||
if ! /usr/sbin/cgproxy --check-master; then | ||
ewarn "cgmanager is not running" | ||
return 1 | ||
fi | ||
# cgproxy should only run on container unless on older kernel | ||
if [ -e /proc/self/ns/pid ] && [ "$NESTED" != "yes" ]; then | ||
eerror "Too old kernel to support cgroup, please update to >3.8" | ||
return 1 | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters