]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
mountcgroups: use the right configuration file!
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 13 Aug 2013 05:05:49 +0000 (00:05 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 13 Aug 2013 05:06:32 +0000 (00:06 -0500)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
hooks/mountcgroups

index c1cdcd446da590d11bf2806fb40611596a1184b9..8ffb370f5ea265bc69ae214d6e99642e7be9721e 100755 (executable)
@@ -26,6 +26,7 @@
 set -e
 
 c=$1
+configfile=$LXC_CONFIG_FILE
 d=/sys/fs/cgroup
 d2=$LXC_ROOTFS_MOUNT/${d}
 # name lxc hook lxcpath
@@ -42,7 +43,7 @@ do_devices_setup() {
     local line
     local w  # which (allow or deny)
     local v  # value
-    egrep "^lxc.cgroup.devices.(allow|deny)[ \t]*=" ${lxcpath}/${c}/config | while read line; do
+    egrep "^lxc.cgroup.devices.(allow|deny)[ \t]*=" ${configfile} | while read line; do
         w=`echo $line | awk -F. '{ print $4 }' | awk '{ print $1 }'`
         v=`echo $line | awk -F= '{ print $2 }'`
         echo "$v" >> "$devdir"/devices.$w