From a7c0ff1e5245639e3e3b4fb505ca0c60c63d241d Mon Sep 17 00:00:00 2001 From: Antoine Catton Date: Fri, 24 Aug 2012 20:25:13 +0900 Subject: [PATCH] Remove slapos.cookbook:template dependency from lxc --- software/lxc/instance-lxc.cfg | 7 ++----- software/lxc/lxc.conf.in | 10 +++++----- software/lxc/software.cfg | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/software/lxc/instance-lxc.cfg b/software/lxc/instance-lxc.cfg index ed36e0c..fb1df1e 100644 --- a/software/lxc/instance-lxc.cfg +++ b/software/lxc/instance-lxc.cfg @@ -57,14 +57,11 @@ path = ${tar:location}/bin/:${gzip:location}/bin/:${bzip2:location}/bin/:${xz-ut archive = true [lxc-conf] -recipe = slapos.cookbook:template -template = ${lxc-conf-in:location}/${lxc-conf-in:filename} +recipe = slapos.recipe.template +url = ${lxc-conf-in:location}/${lxc-conf-in:filename} output = $${rootdirectory:etc}/lxc.conf bridge = !!BRIDGE_NAME!! interface = lxc$${slap-network-information:network-interface} -name = $${uuid:uuid} -rootfs = $${rootfs:downloaded-file} -requested = $${slap-connection:requested} [passwd] recipe = slapos.cookbook:pwgen diff --git a/software/lxc/lxc.conf.in b/software/lxc/lxc.conf.in index a41eab1..af35493 100644 --- a/software/lxc/lxc.conf.in +++ b/software/lxc/lxc.conf.in @@ -1,10 +1,10 @@ -# %(requested)s +# ${slap-connection:requested} -lxc.utsname = %(name)s +lxc.utsname = ${uuid:uuid} lxc.network.type = veth -lxc.network.link = %(bridge)s -lxc.network.veth.pair = %(interface)s +lxc.network.link = ${:bridge} +lxc.network.veth.pair = ${:interface} lxc.network.name = eth0 lxc.network.flags = up @@ -24,6 +24,6 @@ lxc.cgroup.devices.allow = c 136:* rwm lxc.cgroup.devices.allow = c 5:2 rwm lxc.cgroup.devices.allow = c 254:0 rwm -lxc.rootfs = %(rootfs)s +lxc.rootfs = ${rootfs:downloaded-file} lxc.cap.drop = sys_module sys_time sys_chroot mknod diff --git a/software/lxc/software.cfg b/software/lxc/software.cfg index 7814c0a..d35511c 100644 --- a/software/lxc/software.cfg +++ b/software/lxc/software.cfg @@ -36,7 +36,7 @@ mode = 0644 [template-lxc] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-lxc.cfg -md5sum = 27b9c3a9013beda84b336ea603e306bf +md5sum = 056912602caa71a2af9fcae97ee6dfb9 output = ${buildout:directory}/template-lxc.cfg mode = 0644 @@ -44,7 +44,7 @@ mode = 0644 recipe = hexagonit.recipe.download url = ${:_profile_base_location_}/${:filename} filename = lxc.conf.in -md5sum = e47acb30a9783d2f264b51b3c46262ae +md5sum = b25334fc369e4e0f608bc64f14b0315d download-only = true [slapos-toolbox] -- 2.1.4