3 # vim: ts=4 sw=4 sts=4 et tw=72 :
5 # Handle the occurance where SELINUX is actually disabled
6 if [ `grep SELINUX=permissive /etc/selinux/config` ]; then
7 # make sure that the filesystem is properly labelled.
8 # it could be not fully labeled correctly if it was just switched
9 # from disabled, the autorelabel misses some things
10 # skip relabelling on /dev as it will generally throw errors
11 restorecon -R -e /dev /
13 # enable enforcing mode from the very start
16 # configure system for enforcing mode on next boot
17 sed -i 's/SELINUX=permissive/SELINUX=enforcing/' /etc/selinux/config
19 sed -i 's/SELINUX=disabled/SELINUX=permissive/' /etc/selinux/config
22 echo "*******************************************"
23 echo "** SYSTEM REQUIRES A RESTART FOR SELINUX **"
24 echo "*******************************************"
30 # add in components we need or want on systems
31 yum install -y -q @base unzip xz puppet git perl-XML-XPath
33 # All of our systems require Java (because of Jenkins)
34 # Install all versions of the OpenJDK devel but force 1.7.0 to be the
37 yum install -y -q 'java-*-openjdk-devel'
38 alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
39 alternatives --set java_sdk_openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64
41 # To handle the prompt style that is expected all over the environment
42 # with how use use robotframework we need to make sure that it is
43 # consistent for any of the users that are created during dynamic spin
45 echo 'PS1="[\u@\h \W]> "' >> /etc/skel/.bashrc
47 # Do any Distro specific installations here
48 echo "Checking distribution"
49 if [ `/usr/bin/facter operatingsystem` = "Fedora" ]; then
50 echo "---> Fedora found"
51 echo "No extra steps for Fedora"
53 if [ `/usr/bin/facter operatingsystemrelease | /bin/cut -d '.' -f1` = "7" ]; then
55 echo "No extra steps currently for CentOS 7"
58 echo "Installing ODL YUM repo"
59 yum install -q -y https://nexus.opendaylight.org/content/repositories/opendaylight-yum-epel-6-x86_64/rpm/opendaylight-release/0.1.0-1.el6.noarch/opendaylight-release-0.1.0-1.el6.noarch.rpm