Skip to content
Snippets Groups Projects
Commit b47aa5da authored by lantz's avatar lantz
Browse files

Merge pull request #558 from bregman-arie/master

Update install.sh to support RedHat distrubtion
parents af0215fb 0c2fbaf1
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,8 @@ if [ "$DIST" = "Ubuntu" ] || [ "$DIST" = "Debian" ]; then ...@@ -45,7 +45,8 @@ if [ "$DIST" = "Ubuntu" ] || [ "$DIST" = "Debian" ]; then
fi fi
fi fi
test -e /etc/fedora-release && DIST="Fedora" test -e /etc/fedora-release && DIST="Fedora"
if [ "$DIST" = "Fedora" ]; then test -e /etc/redhat-release && DIST="RedHatEnterpriseServer"
if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
install='sudo yum -y install' install='sudo yum -y install'
remove='sudo yum -y erase' remove='sudo yum -y erase'
pkginst='sudo rpm -ivh' pkginst='sudo rpm -ivh'
...@@ -66,8 +67,8 @@ echo "Detected Linux distribution: $DIST $RELEASE $CODENAME $ARCH" ...@@ -66,8 +67,8 @@ echo "Detected Linux distribution: $DIST $RELEASE $CODENAME $ARCH"
KERNEL_NAME=`uname -r` KERNEL_NAME=`uname -r`
KERNEL_HEADERS=kernel-headers-${KERNEL_NAME} KERNEL_HEADERS=kernel-headers-${KERNEL_NAME}
if ! echo $DIST | egrep 'Ubuntu|Debian|Fedora'; then if ! echo $DIST | egrep 'Ubuntu|Debian|Fedora|RedHatEnterpriseServer'; then
echo "Install.sh currently only supports Ubuntu, Debian and Fedora." echo "Install.sh currently only supports Ubuntu, Debian, RedHat and Fedora."
exit 1 exit 1
fi fi
...@@ -123,7 +124,7 @@ function kernel_clean { ...@@ -123,7 +124,7 @@ function kernel_clean {
# Install Mininet deps # Install Mininet deps
function mn_deps { function mn_deps {
echo "Installing Mininet dependencies" echo "Installing Mininet dependencies"
if [ "$DIST" = "Fedora" ]; then if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
$install gcc make socat psmisc xterm openssh-clients iperf \ $install gcc make socat psmisc xterm openssh-clients iperf \
iproute telnet python-setuptools libcgroup-tools \ iproute telnet python-setuptools libcgroup-tools \
ethtool help2man pyflakes pylint python-pep8 ethtool help2man pyflakes pylint python-pep8
...@@ -156,7 +157,7 @@ function of { ...@@ -156,7 +157,7 @@ function of {
echo "Installing OpenFlow reference implementation..." echo "Installing OpenFlow reference implementation..."
cd $BUILD_DIR cd $BUILD_DIR
$install autoconf automake libtool make gcc $install autoconf automake libtool make gcc
if [ "$DIST" = "Fedora" ]; then if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
$install git pkgconfig glibc-devel $install git pkgconfig glibc-devel
else else
$install git-core autotools-dev pkg-config libc6-dev $install git-core autotools-dev pkg-config libc6-dev
...@@ -224,7 +225,7 @@ function of13 { ...@@ -224,7 +225,7 @@ function of13 {
function install_wireshark { function install_wireshark {
if ! which wireshark; then if ! which wireshark; then
echo "Installing Wireshark" echo "Installing Wireshark"
if [ "$DIST" = "Fedora" ]; then if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
$install wireshark wireshark-gnome $install wireshark wireshark-gnome
else else
$install wireshark tshark $install wireshark tshark
...@@ -334,7 +335,7 @@ function ubuntuOvs { ...@@ -334,7 +335,7 @@ function ubuntuOvs {
function ovs { function ovs {
echo "Installing Open vSwitch..." echo "Installing Open vSwitch..."
if [ "$DIST" == "Fedora" ]; then if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
$install openvswitch openvswitch-controller $install openvswitch openvswitch-controller
return return
fi fi
...@@ -546,7 +547,7 @@ function oftest { ...@@ -546,7 +547,7 @@ function oftest {
function cbench { function cbench {
echo "Installing cbench..." echo "Installing cbench..."
if [ "$DIST" = "Fedora" ]; then if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
$install net-snmp-devel libpcap-devel libconfig-devel $install net-snmp-devel libpcap-devel libconfig-devel
else else
$install libsnmp-dev libpcap-dev libconfig-dev $install libsnmp-dev libpcap-dev libconfig-dev
...@@ -616,7 +617,7 @@ net.ipv6.conf.lo.disable_ipv6 = 1' | sudo tee -a /etc/sysctl.conf > /dev/null ...@@ -616,7 +617,7 @@ net.ipv6.conf.lo.disable_ipv6 = 1' | sudo tee -a /etc/sysctl.conf > /dev/null
$install ntp $install ntp
# Install vconfig for VLAN example # Install vconfig for VLAN example
if [ "$DIST" = "Fedora" ]; then if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
$install vconfig $install vconfig
else else
$install vlan $install vlan
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment