fix for ubuntu, forgot some $verser in there
[build.git] / lbuild-initvm.sh
index 45fdb8d..fdea57a 100755 (executable)
@@ -575,7 +575,8 @@ function setup_lxc() {
     mkdir $rootfs_path/root/.ssh
     cat /root/.ssh/id_rsa.pub >> $rootfs_path/root/.ssh/authorized_keys
     
-    config_xml=$config_path/"lxc.xml"
+    # don't keep the input xml, this can be retrieved at all times with virsh dumpxml
+    config_xml=$tmp/$lxc.xml
     ( [ -n "$BUILD_MODE" ] && write_lxc_xml_build $lxc || write_lxc_xml_test $lxc ) > $config_xml
     
     # define lxc container for libvirt
@@ -721,12 +722,12 @@ function devel_or_vtest_tools () {
            ;;
        debootstrap)
            # for ubuntu
-           if grep -iq ubuntu /vservers/$vserver/rootfs/etc/lsb-release 2> /dev/null; then
+           if grep -iq ubuntu /vservers/$lxc/rootfs/etc/lsb-release 2> /dev/null; then
                # on ubuntu, at this point we end up with a single feed in /etc/apt/sources.list
                # we need at least to add the 'universe' feed for python-rpm
-               ( cd /vservers/$vserver/rootfs/etc/apt ; head -1 sources.list | sed -e s,main,universe, > sources.list.d/universe.list )
+               ( cd /vservers/$lxc/rootfs/etc/apt ; head -1 sources.list | sed -e s,main,universe, > sources.list.d/universe.list )
                # also adding a link to updates sounds about right
-               ( cd /vservers/$vserver/rootfs/etc/apt ; head -1 sources.list | sed -e 's, main,-updates main,' > sources.list.d/updates.list )
+               ( cd /vservers/$lxc/rootfs/etc/apt ; head -1 sources.list | sed -e 's, main,-updates main,' > sources.list.d/updates.list )
            fi
            chroot $rootfs_path apt-get update
            for package in $packages ; do