Merge "Update the spin-up script for mininet systems"
[releng/builder.git] / jenkins-scripts / mininet.sh
1 #!/bin/bash
2
3 # for whatever reason netopeer & CPqD aren't installed (they weren't in
4 # one of the yum repos we were hooked up to when the base image was
5 # built, they are now. Make sure they're install
6 yum install -q -y netopeer-server-sl CPqD-ofsoftswitch13
7
8 # the vagrant configuration for netopeer doesn't configure SSH correctly
9 # as it uses and here document via echo and not cat fix that
10 cat << EOSSH >> /etc/ssh/sshd_config
11
12 # Added for netconf / netopeer testing
13 Port 22
14 Port 830
15 Subsystem netconf /usr/bin/netopeer-server-sl
16 EOSSH
17
18 # sshd has to get a restart because of the above
19 service sshd restart
20
21 # found out while doing testing to fix netopeer that the selinux perms
22 # aren't set correctly (thanks Rackspace for having an EL6 image that
23 # didn't have selinux on at first!) fix it so that the password can be
24 # set
25 /sbin/restorecon -R /etc
26
27 # According to Luis in RT7956 the controller SSH capabilities require
28 # that for NETCONF it uses a password (how broken!) So we're going to
29 # force a password onto the jenkins user
30 echo 'jenkins' | passwd -f --stdin jenkins
31
32 # make sure the firewall is stopped
33 service iptables stop
34
35 # vim: sw=2 ts=2 sts=2 et :