install -D -m 755 initscripts/lxc-sliceimage ${RPM_BUILD_ROOT}/%{_initrddir}/lxc-sliceimage
install -D -m 644 cron.d/lxc-sliceimage $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/lxc-sliceimage
install -D -m 644 logrotate/lxc-sliceimage $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/lxc-sliceimage
+install -C -m 644 lxc_template.xml $RPM_BUILD_ROOT/vservers/.lvref/lxc_template.xml
%clean
rm -rf $RPM_BUILD_ROOT
%{_initrddir}/lxc-sliceimage
%{_sysconfdir}/cron.d/lxc-sliceimage
%{_sysconfdir}/logrotate.d/lxc-sliceimage
+/vservers/.lvref
%post
chkconfig --add lxc-sliceimage
--- /dev/null
+<domain type='lxc'>
+ <name>$name</name>
+ <memory>32768</memory>
+ <os>
+ <type>exe</type>
+ <init>/sbin/init</init>
+ </os>
+ <vcpu>1</vcpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/libexec/libvirt_lxc</emulator>
+ <filesystem type='mount'>
+ <source dir='/vservers/$name/'/>
+ <target dir='/'/>
+ </filesystem>
+ <interface type='network'>
+ <source network='default'/>
+ <target dev='veth$xid'/>
+ </interface>
+ <console type='pty' />
+ </devices>
+</domain>