mirror of
git://github.com/lxc/lxc
synced 2025-09-03 22:09:30 +00:00
make mountcgroups hook to lxc.include aware (v2)
[resending the patch from correct branch]
commit 09ad624693
introduced lxc.include option
to include other config files. This patch uses it in mountcgroups hook otherwise
lxc-start fails with following error message for the nested containers;
root@oOo:/var/lib/lxc/raring# lxc-start -l debug -o l -n raring -d
lxc-start: command get_cgroup failed to receive response
Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
committed by
Serge Hallyn
parent
f91d5e4e3f
commit
fa7fced878
@@ -43,7 +43,9 @@ do_devices_setup() {
|
|||||||
local line
|
local line
|
||||||
local w # which (allow or deny)
|
local w # which (allow or deny)
|
||||||
local v # value
|
local v # value
|
||||||
egrep "^lxc.cgroup.devices.(allow|deny)[ \t]*=" ${configfile} | while read line; do
|
# lxc.include provides common configuration options
|
||||||
|
local commonconfigfile=$(egrep "^lxc.include[ \t]*=" ${configfile} | awk -F= '{ print $2 }')
|
||||||
|
cat ${configfile} ${commonconfigfile} | egrep "^lxc.cgroup.devices.(allow|deny)[ \t]*=" | while read line; do
|
||||||
w=`echo $line | awk -F. '{ print $4 }' | awk '{ print $1 }'`
|
w=`echo $line | awk -F. '{ print $4 }' | awk '{ print $1 }'`
|
||||||
v=`echo $line | awk -F= '{ print $2 }'`
|
v=`echo $line | awk -F= '{ print $2 }'`
|
||||||
echo "$v" >> "$devdir"/devices.$w
|
echo "$v" >> "$devdir"/devices.$w
|
||||||
|
Reference in New Issue
Block a user