diff options
Diffstat (limited to 'src/lxc/lxc-ls.in')
-rw-r--r-- | src/lxc/lxc-ls.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lxc/lxc-ls.in b/src/lxc/lxc-ls.in index d200509..a1ad642 100644 --- a/src/lxc/lxc-ls.in +++ b/src/lxc/lxc-ls.in @@ -33,7 +33,11 @@ if test -n "$active"; then if test -n "$mount_point"; then # get cgroup for init init_cgroup=`cat /proc/1/cgroup | awk -F: '{ print $3 }' | head -1` - cd $mount_point/$init_cgroup/lxc + if [ ! -d $mount_point/$init_cgroup/lxc ]; then + cd $mount_point/$init_cgroup + else + cd $mount_point/$init_cgroup/lxc + fi ls "$@" -d $active fi fi |