checkfstab:
@grep ^cgroup /etc/fstab || (echo "You need to add cgroup entry to fstab 'cgroup /cgroup cgroup defaults 0 0'" && false)
-/usr/lib/lxc:
+/usr/share/lxc:
@[ -d $@ ] || sudo apt-get install lxc
/usr/share/bridge-utils:
[ -e ssh ] || (echo "You need a ssh dir containing host keys like /etc/ssh_host_*" && false)
setname: beroot
- echo "debian6.local" > $(VMROOT)/rootfs/etc/hostname
- grep -q debian6.local $(VMROOT)/rootfs/etc/hosts || echo "$(IPDEBBASE).$(VEIDDEB) debian6.local debian6" >> $(VMROOT)/rootfs/etc/hosts
+ echo "debian7.local" > $(VMROOT)/rootfs/etc/hostname
+ grep -q debian7.local $(VMROOT)/rootfs/etc/hosts || echo "$(IPDEBBASE).$(VEIDDEB) debian7.local debian7" >> $(VMROOT)/rootfs/etc/hosts
beroot:
@[ $(shell id -u) = "0" ] || (echo "you should be root to run this" ; exit 1)
delrights: beroot
lxc-setcap -d
-installtemplate: /usr/lib/lxc/templates/lxc-debian6 /usr/lib/lxc/templates/lxc-centos5
+installtemplate: /usr/share/lxc/templates/lxc-debian7 /usr/share/lxc/templates/lxc-debian6 /usr/share/lxc/templates/lxc-centos5 /usr/share/lxc/templates/lxc-centos6
-/usr/lib/lxc/templates/lxc-debian6: lxc-debian6 /usr/lib/lxc
- cat lxc-debian6 | sed 's!http://cdn.debian.net/debian/!$(DEBMIRROR)!' > /usr/lib/lxc/templates/lxc-debian6
- chmod 755 /usr/lib/lxc/templates/lxc-debian6
+/usr/share/lxc/templates/lxc-debian6: lxc-debian6 /usr/share/lxc
+ cat lxc-debian6 | sed 's!http://cdn.debian.net/debian/!$(DEBMIRROR)!' > /usr/share/lxc/templates/lxc-debian6
+ chmod 755 /usr/share/lxc/templates/lxc-debian6
-/usr/lib/lxc/templates/lxc-centos5: lxc-centos5 /usr/lib/lxc
- cp lxc-centos5 /usr/lib/lxc/templates/
+/usr/share/lxc/templates/lxc-debian7: lxc-debian7 /usr/share/lxc
+ cat lxc-debian7 | sed 's!http://cdn.debian.net/debian/!$(DEBMIRROR)!' > /usr/share/lxc/templates/lxc-debian7
+ chmod 755 /usr/share/lxc/templates/lxc-debian7
+
+/usr/share/lxc/templates/lxc-centos5: lxc-centos5 /usr/share/lxc
+ cp lxc-centos5 /usr/share/lxc/templates/
+
+/usr/share/lxc/templates/lxc-centos6: lxc-centos6 /usr/share/lxc
+ cp lxc-centos6 /usr/share/lxc/templates/
+
+/usr/share/lxc/templates/lxc-centos5: lxc-centos5 /usr/share/lxc
+ cp lxc-centos5 /usr/share/lxc/templates/
createdeb:
- sudo /usr/bin/lxc-create -n debian6.local -f config.debian6 -t debian6
+ sudo /usr/bin/lxc-create -n dhdebian7.local -f config.debian7 -t debian7
createcos: /usr/bin/netmask /usr/bin/rinse
- sudo /usr/bin/lxc-create -n centos5.local -f config.centos5 -t centos5
+ sudo /usr/bin/lxc-create -n dhcentos5.local -f config.centos5 -t centos5
startdeb: checkmount
- sudo LANG=C /usr/bin/lxc-start -n debian6.local -d
+ sudo LANG=C /usr/bin/lxc-start -n dhdebian7.local -d
stopdeb:
- sudo LANG=C /usr/bin/lxc-stop -n debian6.local
+ sudo LANG=C /usr/bin/lxc-stop -n dhdebian7.local
startcos: checkmount
- sudo LANG=C /usr/bin/lxc-start -n centos5.local -d
+ sudo LANG=C /usr/bin/lxc-start -n dhcentos5.local -d
stopcos:
- sudo LANG=C /usr/bin/lxc-stop -n centos5.local
+ sudo LANG=C /usr/bin/lxc-stop -n dhcentos5.local
+
+destroydeb:
+ sudo LANG=C /usr/bin/lxc-stop -n dhdebian7.local
+ sudo LANG=C /usr/bin/lxc-destroy -n dhdebian7.local
-destroydeb: beroot
- sudo LANG=C /usr/bin/lxc-stop -n debian6.local
- sudo LANG=C /usr/bin/lxc-destroy -n debian6.local
+destroycos:
+ sudo LANG=C /usr/bin/lxc-stop -n dhcentos5.local
+ sudo LANG=C /usr/bin/lxc-destroy -n dhcentos5.local
-destroycos: beroot
- sudo LANG=C /usr/bin/lxc-stop -n centos5.local
- sudo LANG=C /usr/bin/lxc-destroy -n centos5.local