Commit 3b9bad3d by Christian Seiler Committed by Stéphane Graber

lxc-ls: Scan cgroup mount points from fstype and not device

lxc-ls --active now scans mount points that have the 'cgroup' filesystem type and not the 'cgroup' device name (which is ignored anyway and may be anything). Signed-off-by: 's avatarChristian Seiler <christian@iwakd.de> Cc: Serge Hallyn <serge.hallyn@ubuntu.com>
parent c12e7752
......@@ -56,7 +56,7 @@ get_parent_cgroup()
init_cgroup=${fields#*:}
# Get the filesystem mountpoint of the hierarchy
mountpoint=$(grep -E "^cgroup [^ ]+ [^ ]+ ([^ ]+,)?$subsystems(,[^ ]+)? " /proc/self/mounts | cut -d ' ' -f 2)
mountpoint=$(grep -E "^[^ ]+ [^ ]+ cgroup ([^ ]+,)?$subsystems(,[^ ]+)? " /proc/self/mounts | cut -d ' ' -f 2)
if [ -z "$mountpoint" ]; then continue; fi
# Return the absolute path to the containers' parent cgroup
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment