aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/lxc/lxc-ls.in')
-rw-r--r--src/lxc/lxc-ls.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lxc/lxc-ls.in b/src/lxc/lxc-ls.in
index 2f9075c..792ea0e 100644
--- a/src/lxc/lxc-ls.in
+++ b/src/lxc/lxc-ls.in
@@ -31,6 +31,9 @@ active=$(netstat -xl | grep $lxcpath | \
if test -n "$active"; then
get_cgroup
if test -n "$mount_point"; then
- cd $mount_point; ls "$@" -d $active
+ # get cgroup for init
+ init_cgroup=`cat /proc/1/cgroup | awk -F: '{ print $3 }' | head -1`
+ cd $mount_point/$init_cgroup/lxc
+ ls "$@" -d $active
fi
fi