From 1f48b32c42e0b443a1e7c8b7d21a8d9a771ec0d8 Mon Sep 17 00:00:00 2001 From: Peter Wilmott
Date: Fri, 31 Jul 2015 19:35:42 +0000
Subject: [PATCH] Cleaned up cgroup implementation
Set default limits to 1 core and 512MB, CGX has also been removed to try
and make it more clear what is calling what.
---
bocker | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/bocker b/bocker
index 37e41c8..2e0b786 100755
--- a/bocker
+++ b/bocker
@@ -1,7 +1,6 @@
#!/usr/bin/env bash
set -o errexit -o nounset -o pipefail; shopt -s nullglob
-btrfs_path='/var/bocker'
-cgroups='cpu,cpuacct,cpuset,memory'; $(cgget -h &> /dev/null) && CGX="cgexec -g $cgroups" || CGX='_='
+btrfs_path='/var/bocker'; cgroups='cpu,cpuacct,cpuset,memory';
function bocker_check() {
btrfs subvolume list "$btrfs_path" | grep -qw "$1" && echo 0 || echo 1
@@ -76,8 +75,10 @@ function bocker_run() { #HELP Create a container:\nBOCKER run