2 ##############################################################################
3 # Copyright (c) 2015 Ericsson AB and others.
4 # stefan.k.berg@ericsson.com
5 # jonas.bjurel@ericsson.com
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
12 # Needed to expose underlying cgroups to container
13 echo "running x2" > /x2
14 mount -n -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
15 mount -t securityfs none /sys/kernel/security
17 for mnt in $(cut -d: -f2 /proc/1/cgroup); do
18 mkdir /sys/fs/cgroup/$mnt
19 mount -n -t cgroup -o $mnt cgroup /sys/fs/cgroup/$mnt