Adding installation for Syslog and Netflow
[releng/builder.git] / vagrant / ovsdb-devstack / bootstrap.sh
index 47e2af60c056928e743c45f4418c398a63b2ff27..839c4500e42c0b27819cce938f73d214c25884d5 100644 (file)
@@ -8,8 +8,18 @@ sed -i 's/SELINUX=permissive/SELINUX=enforcing/' /etc/selinux/config
 
 yum clean all
 yum update -y
-yum install -q -y deltarpm python python-crypto python-devel python-lxml python-setuptools @development-tools libxml2-devel libxslt-devel libffi-devel
-yum install -q -y java git sudo openssl-devel
+yum install -q -y deltarpm python{,-{crypto,devel,lxml,setuptools}} \
+    @development {lib{xml2,xslt,ffi},openssl}-devel \
+    java git sudo
+
+# figure out what the latest kernel installed is and switch to it
+# NOTE: This is done like this becase the Rackspace F20 images are using
+# extlinux / syslinux and don't switch to the newest kernel on update
+NEWKERNEL=`rpm -qa | grep kernel-3 | sort -r | head -1 | cut -c 8-`
+if [ -f /boot/extlinux.conf ]; then
+    BOOTLABEL=`grep ${NEWKERNEL} /boot/extlinux.conf | grep LABEL | cut -c 7-`
+    sed -i "s/ONTIMEOUT linux/ONTIMEOUT ${BOOTLABEL}/" /boot/extlinux.conf
+fi
 
 if [ ! -f /etc/udev/rules.d/80-net-setup-link.rules ]; then
     ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
@@ -18,3 +28,5 @@ fi
 echo "***************************************************"
 echo "*   PLEASE RELOAD THIS VAGRANT BOX BEFORE USE     *"
 echo "***************************************************"
+
+# vim: sw=4 ts=4 sts=4 et :