+ #################### 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" != "$lxc_version" ] ; 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
+ 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
+
+ #################### bride initialization
+ check_yum_installed bridge-utils
+ #Bridge init
+ isInstalled=$(netstat -rn | grep '^0.0.0.0' | awk '{print $8;}')
+ if [ "$isInstalled" != "br0" ] ; then
+ bridge_init
+ sleep 5
+ fi