If memory cgroup does not existed,
- we will not try to create memory cgroup or remount memory cgroup.
- malort will not setup memory cgroup
if [ x$1 == "xstart" ]
then
- while [ ! -d "/sys/fs/cgroup/memory" ]
- do
- /usr/bin/cgroup_remount
- sleep 1;
- done
-
- mkdir /sys/fs/cgroup/memory/malort
- chown -R owner:users /sys/fs/cgroup/memory/malort
+ if [ -d "/sys/fs/cgroup/memory" ]; then
+ mkdir /sys/fs/cgroup/memory/malort
+ chown -R owner:users /sys/fs/cgroup/memory/malort
+ fi
mkdir /sys/fs/cgroup/cpu/malort
chown -R owner:users /sys/fs/cgroup/cpu/malort