mirror=$(debian_mirror $fcdistro)
debootstrap --arch $arch $fcdistro $lxc_root $mirror
# just like with fedora we ensure a few packages get installed as well
- virsh -c lxc:/// $lxc lxc-enter-namespace /bin/bash -c "apt-get update"
- virsh -c lxc:/// $lxc lxc-enter-namespace /bin/bash -c "apt-get -y install $DEBIAN_PREINSTALLED"
+ virsh -c lxc:/// lxc-enter-namespace $lxc /bin/bash -c "apt-get update"
+ virsh -c lxc:/// lxc-enter-namespace $lxc /bin/bash -c "apt-get -y install $DEBIAN_PREINSTALLED"
}
function debian_configure () {
# grant ssh access from host to guest
mkdir $lxc_root/root/.ssh
cat /root/.ssh/id_rsa.pub >> $lxc_root/root/.ssh/authorized_keys
-
+ chmod 700 $lxc_root/root/.ssh
+ chmod 600 $lxc_root/root/.ssh/authorized_keys
+
# 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