diff options
author | Camil Staps | 2015-10-29 12:02:58 +0100 |
---|---|---|
committer | Camil Staps | 2016-11-30 19:10:34 +0100 |
commit | 4416c1b1232e717f171b24c0643b0a1bfc8f04ac (patch) | |
tree | ab103a38e8d69f8fbce7079e169f6a7d8014bab4 /bin | |
parent | Bash; path (diff) |
lxc-setup
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/lxc-setup | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/lxc-setup b/bin/lxc-setup new file mode 100755 index 0000000..08824a8 --- /dev/null +++ b/bin/lxc-setup @@ -0,0 +1,20 @@ +# https://wiki.debian.org/LXC +# https://lists.linuxcontainers.org/pipermail/lxc-devel/2014-February/008088.html +# https://lists.debian.org/debian-user/2015/05/msg00162.html +# https://wiki.debian.org/LXC/SimpleBridge +# http://box.matto.nl/lxconlaptop.html +# https://coderwall.com/p/k0gutq/clean-lxc-nat-configuration-debian-wheezy + +for d in /sys/fs/cgroup/* +do + f=$(basename $d) + echo "looking at $f" + if [ "$f" = "cpuset" ]; then + echo 1 | sudo tee -a $d/cgroup.clone_children; + elif [ "$f" = "memory" ]; then + echo 1 | sudo tee -a $d/memory.use_hierarchy; + fi + sudo mkdir $d/$USER + sudo chown -R $USER: $d/$USER + echo $$ > $d/$USER/tasks +done |