diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-25 15:26:24 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-25 15:26:24 +0200 |
commit | b6af1e02efe594039707cd882517663d5370f375 (patch) | |
tree | ff9c2d55873e051e82972ba64c017352d3a75d34 /testing/libcgroup/cgconfig.initd | |
parent | a71346b7acebc600960a98c84fb32cfd72fe864b (diff) | |
download | aports-b6af1e02efe594039707cd882517663d5370f375.tar.bz2 aports-b6af1e02efe594039707cd882517663d5370f375.tar.xz |
testing/[multiple]: move unmaintained packages
This moves all packages from testing to unmaintained which have not been
updated for atleast 6 months. If you are affected by this commit please follow
this proceddure:
* make sure your packages build on all architectures
* move your pacakge(s) back to testing
* if you want to keep this package and can maintain it (or find somebody to
maintain it for you) for a minimum of 6 months ask it to be moved to community
Diffstat (limited to 'testing/libcgroup/cgconfig.initd')
-rw-r--r-- | testing/libcgroup/cgconfig.initd | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/testing/libcgroup/cgconfig.initd b/testing/libcgroup/cgconfig.initd deleted file mode 100644 index ae64ae1611..0000000000 --- a/testing/libcgroup/cgconfig.initd +++ /dev/null @@ -1,120 +0,0 @@ -#!/sbin/openrc-run -# -# Control Groups Configuration Startup -# -# This script runs the cgconfigparser utility to parse and setup -# the control group filesystem. It uses ${CONFIG_FILE} -# and parses the configuration specified in there. -# -CGCONFIGPARSER="/usr/sbin/cgconfigparser" -CGROUP_FS="cgroup" -CONFIG_FILE=${CONFIG_FILE:-"/etc/cgconfig.conf"} -MOUNTS_FILE="/proc/mounts" -RULES_FILE="/etc/cgrules.conf" - -# Support multiple mount points -MOUNT_POINTS= - -move_all_to_init_class() { - local i - for i in $MOUNT_POINTS; do - local mount_point=${i%:*} - cd ${mount_point} - - if grep -qw "${mount_point}" ${MOUNTS_FILE}; then - local directory - for directory in $(find . -depth -type d); do - if [ "${directory}" != "." ]; then - # cat fails with "Argument list too long" error - sed -nu p < ${directory}/tasks > tasks - rmdir ${directory} - fi - done - else - ewarn "Resource control filesystem not mounted" - fi - - cd - >/dev/null - done -} - -parse_mounts() { - local device mount_point fs_type options other - while read device mount_point fs_type options other; do - if echo ${CGROUP_FS} | grep -q ${device}; then - MOUNT_POINTS="${MOUNT_POINTS} ${mount_point}:${options}" - fi - done < ${MOUNTS_FILE} -} - -umount_fs() { - local i - for i in ${MOUNT_POINTS}; do - umount ${i%:*} - rmdir ${i%:*} - done -} - -depend() { - need local -} - -start() { - ebegin "Starting cgconfig service" - - # Mount filesystem and create cgroups - if ! ${CGCONFIGPARSER} -l ${CONFIG_FILE} >/dev/null; then - eend 1 "Failed to parse ${CONFIG_FILE}" - return 1 - fi - - parse_mounts - - # Find default cgroup name in rules file - local default_cgroup - if [ -f "${RULES_FILE}" ]; then - default_cgroup=$(awk '$1 == "*" {print $3; exit}' ${RULES_FILE}) - if [ $default_cgroup == "*" ]; then - ewarn "${RULES_FILE} incorrect" - ewarn "Overriding it" - default_cgroup= - fi - fi - # Use predefined name if none was found - if [ -z "${default_cgroup}" ]; then - default_cgroup=sysdefault - fi - - # Create a default cgroup for tasks to return back to - local i - for i in $MOUNT_POINTS; do - local mount_point=${i%:*} - local mount_options=${i#*:} - # Ignore if directory already exists - mkdir -p ${mount_point}/${default_cgroup} - find ${mount_point}/ -name tasks | xargs chmod a+rw - chmod go-w ${mount_point}/tasks - - # Special rule for cpusets - if echo ${mount_options} | grep -qw cpuset; then - cat ${mount_point}/cpuset.cpus > ${mount_point}/${default_cgroup}/cpuset.cpus - cat ${mount_point}/cpuset.mems > ${mount_point}/${default_cgroup}/cpuset.mems - fi - - # Classify everything to default cgroup - local j - for j in $(ps --no-headers -eL o tid); do - echo $j > ${mount_point}/${default_cgroup}/tasks 2>/dev/null - done - done - - eend 0 -} - -stop() { - ebegin "Stopping cgconfig service" - parse_mounts - move_all_to_init_class - umount_fs - eend 0 -} |