Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Merge branch 'xiujiao-master'
Browse files Browse the repository at this point in the history
Signed-off-by: Swetha Repakula <srepaku@us.ibm.com>
  • Loading branch information
Dan Lavine authored and swetharepakula committed Aug 23, 2016
2 parents b6487e6 + c848987 commit 3d9e3fb
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions warden/root/linux/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,25 @@ then
rmdir /dev/cgroup
fi

cgroup_path=/tmp/warden/cgroup
cgroup_path="/tmp/warden/cgroup"
mkdir -p "${cgroup_path}"

if [ ! -d $cgroup_path ]
# Mount tmpfs
if ! grep "${cgroup_path} " /proc/mounts | cut -d' ' -f3 | grep -q tmpfs
then
mkdir -p $cgroup_path
mount -t tmpfs none "${cgroup_path}"
fi

# Mount cgroup subsystems individually
for subsystem in cpu cpuacct devices memory
do
mkdir -p "${cgroup_path}/${subsystem}"

# Mount tmpfs
if ! grep "${cgroup_path} " /proc/mounts | cut -d' ' -f3 | grep -q tmpfs
if ! grep -q "${cgroup_path}/${subsystem} " /proc/mounts
then
mount -t tmpfs none $cgroup_path
mount -t cgroup -o "${subsystem}" none "${cgroup_path}/${subsystem}"
fi

# Mount cgroup subsystems individually
for subsystem in cpu cpuacct devices memory
do
mkdir -p $cgroup_path/$subsystem

if ! grep -q "${cgroup_path}/$subsystem " /proc/mounts
then
mount -t cgroup -o $subsystem none $cgroup_path/$subsystem
fi
done
fi
done

./net.sh setup

Expand Down

0 comments on commit 3d9e3fb

Please sign in to comment.