From d31c50870d0bee042ce660e445c9294a59a3a65b Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Thu, 30 Jun 2016 20:26:57 +0000 Subject: Slackware 14.2 Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-) --- source/ap/cgmanager/config/rc.cgproxy | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 source/ap/cgmanager/config/rc.cgproxy (limited to 'source/ap/cgmanager/config/rc.cgproxy') diff --git a/source/ap/cgmanager/config/rc.cgproxy b/source/ap/cgmanager/config/rc.cgproxy new file mode 100644 index 000000000..bd96902cb --- /dev/null +++ b/source/ap/cgmanager/config/rc.cgproxy @@ -0,0 +1,58 @@ +#!/bin/sh + +# /etc/rc.d/rc.cgproxy - start/stop the cgroup proxy manager + +if [ -f /etc/default/cgproxy ]; then + # get cgproxy options if specified + . /etc/default/cgproxy +fi + +start_cgproxy() { + # cgproxy should only run on container unless on older kernel + if [ -e /proc/self/ns/pid ] && [ "$NESTED" != "yes" ]; then + echo "Error: cgproxy should only run inside containers" + exit 0 + fi + echo "Starting cgproxy: /usr/sbin/cgproxy --daemon" + /usr/sbin/cgproxy --daemon +} + +stop_cgproxy() { + if ps -C cgproxy | grep -q cgproxy 2>/dev/null ; then + echo "Stopping cgproxy." + if ! /bin/kill $(cat /run/cgproxy.pid 2>/dev/null) 2>/dev/null ; then + sleep 1 + echo "Sending cgproxy the TERM signal." + if ! /usr/bin/pkill -TERM cgproxy ; then + sleep 5 + echo "Sending cgproxy the KILL signal." + /usr/bin/pkill -KILL cgproxy + sleep 5 + if ps -C cgproxy | grep -q cgproxy 2>/dev/null ; then + echo "Error: couldn't stop cgproxy." + fi + fi + fi + rm -f /run/cgproxy.pid + fi +} + +restart_cgproxy() { + stop_cgproxy + sleep 1 + start_cgproxy +} + +case "$1" in +'start') + start_cgproxy + ;; +'stop') + stop_cgproxy + ;; +'restart') + restart_cgproxy + ;; +*) + echo "usage $0 start|stop|restart" +esac -- cgit v1.2.3-65-gdbad