Fix libs/cgroups.bash
This commit is contained in:
parent
7567a2c63f
commit
8225f62b87
@ -2,15 +2,18 @@
|
|||||||
|
|
||||||
# Use cgroups
|
# Use cgroups
|
||||||
if [ "$PS1" ] ; then
|
if [ "$PS1" ] ; then
|
||||||
|
|
||||||
if [ -d /sys/fs/cgroup ] ; then
|
if [ -d /sys/fs/cgroup ] ; then
|
||||||
cdir=/sys/fs/cgroup
|
cdir=/sys/fs/cgroup
|
||||||
elif [ -d /dev/cgroup ]; then
|
elif [ -d /dev/cgroup ]; then
|
||||||
cdir=/dev/cgroup
|
cdir=/dev/cgroup
|
||||||
fi
|
fi
|
||||||
if [ -z "$cdir" ]; then
|
|
||||||
|
if [ -n "$cdir" ]; then
|
||||||
mkdir -p -m 0700 $cdir/user/$$ > /dev/null 2>&1
|
mkdir -p -m 0700 $cdir/user/$$ > /dev/null 2>&1
|
||||||
/bin/echo $$ > $cdir/user/$$/tasks
|
/bin/echo $$ > $cdir/user/$$/tasks
|
||||||
/bin/echo '1' > $cdir/user/$$/notify_on_release
|
/bin/echo '1' > $cdir/user/$$/notify_on_release
|
||||||
unset -v cdir
|
unset -v cdir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user