From cc7155f33b40cc780176c74b1b8acc6a2336528f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 26 Sep 2011 18:27:35 -0400 Subject: [PATCH] * centos 5.6 workaround --- loadbot/init_all.sh | 8 -------- loadbot/prep.pl | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/loadbot/init_all.sh b/loadbot/init_all.sh index 41ba4da..1d0fc0c 100755 --- a/loadbot/init_all.sh +++ b/loadbot/init_all.sh @@ -22,11 +22,3 @@ cat testservers |xargs -n 1 --replace=BLAH echo ./ssh.pl BLAH root dopass \$1 > bash -x do_all.sh "echo >> /etc/hosts" bash -x do_all.sh "echo 69.55.54.144 loadbot >> /etc/hosts" bash -x do_all.sh "restorecon -R /root/.ssh/" - -echo "now copy prep.pl over to each server. this should be fast (no resolution delays)" -sleep 3 -cat testservers |xargs -n 1 --replace=BLAH scp prep.pl BLAH: - -echo "now run prep.pl" -sleep 3 -cat testservers |xargs -n 1 --replace=BLAH ssh BLAH ./prep.pl diff --git a/loadbot/prep.pl b/loadbot/prep.pl index 2658faf..5852cdb 100755 --- a/loadbot/prep.pl +++ b/loadbot/prep.pl @@ -10,9 +10,10 @@ print "screen RETURN: $return\n"; if ($return eq "-1") { if (-e "/etc/gentoo-release") { system "emerge app-misc/screen"; - } else { + } elsif (-e "/etc/redhat-release") { system "yum install screen -y"; - system "cat /etc/redhat-release"; + } else { + system "apt-get install screen"; } system "ifconfig"; } @@ -38,6 +39,16 @@ if ($return eq "-1") { if (-e "/etc/gentoo-release") { system "emerge git"; } elsif (-e "/etc/redhat-release") { + my @parts = split " ", `cat /etc/redhat-release`; + if ($parts[2] eq "5.6") { + my $arch = `uname -m`; + chomp $arch; + if ($arch eq "x86_64") { + system "rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm"; + } else { + system "rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm"; + } + } system "yum install git -y"; } else { system "apt-get -y install git";