-
- #################### lxc-tools : rebuild as current fedora release has flaws
- #install development tools
- check_yumgroup_installed "Development Tools"
- #install libcap-devel, libvirt
- check_yum_installed libcap-devel
- check_yum_installed libvirt
-
- #retrieve and install lxc from sources
- raw_version=$(lxc-version ||: )
- lxc_installed_version=$(echo $raw_version | sed -e 's,.*: ,,')
- if [ "$lxc_installed_version" != "$(echo $lxc_version | cut -d'-' -f2)" ] ; then
- echo "Expecting version" '['$lxc_version']'
- echo "Found version" '['$lxc_installed_version']'
- echo "Installing lxc ..."
- cd /root
- [ -d lxc ] || git clone "$lxc_git_repo"
- cd lxc
- git pull
- git checkout $lxc_version
- ./autogen.sh
- ./configure --prefix=/usr --exec-prefix=/usr --disable-apparmor
- make
- make install
- mkdir -p /usr/var/lib/
- [ -d /usr/var/lib/lxc ] || ln -s /var/lib/lxc /usr/var/lib/lxc
- cd $BUILD_DIR
- fi
-
-# #create a placeholder (just a hack to make lxc works)
-# [ -d "/usr/local/var/lib" ] || mkdir -p /usr/local/var/lib
+
+ host_fcdistro="$(cat /etc/fedora-release | cut -d' ' -f3)"
+ ## check if libvirt_version is installed
+ virsh -v | grep -e $libvirt_version || { echo "$libvirt_version needs to be installed!!!" ; exit 1 ; }
+# host_fcdistro="$(cat /etc/fedora-release | cut -d' ' -f3)"
+# if [ ! -f /etc/yum.repos.d/libvirt.repo ] ; then
+# touch /etc/yum.repos.d/libvirt.repo
+# cat <<EOF > /etc/yum.repos.d/libvirt.repo
+#[libvirt]
+#name=libvirt-1.0.2-1
+#baseurl=http://build.onelab.eu/lxc/2013.02.25--lxc$host_fcdistro/RPMS/
+#enabled=1
+#gpgcheck=0
+#EOF
+#
+# yum --assumeno update
+# check_yumgroup_installed "Development Tools"
+# check_yum_installed libcap-devel
+# check_yum_installed libvirt
+# systemctl start libvirtd
+# fi