From d9b67f13a8120a193dce6b84d2fd0faff9e1b1f2 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 12 May 2010 19:29:37 +0000 Subject: [PATCH] -Prefer ipmitool-xcat provided ipmitool binary git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6077 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/cons/ipmi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/cons/ipmi b/xCAT-server/share/xcat/cons/ipmi index 5e61c37da..903bc51e1 100755 --- a/xCAT-server/share/xcat/cons/ipmi +++ b/xCAT-server/share/xcat/cons/ipmi @@ -90,13 +90,17 @@ release_lock(); my $isintel=0; my $sleepint; my $rc; -my @mcinfo=`ipmitool -I lan -U $username -P $password -H $bmc mc info`;#| grep 'Manufacturer ID : 343' > /dev/null 2>&1"; +my $ipmitool = "ipmitool"; +if (-x "$XCATROOT/bin/ipmitool-xcat") { + $ipmitool = "$XCATROOT/bin/ipmitool-xcat"; +} +my @mcinfo=`$ipmitool -I lan -U $username -P $password -H $bmc mc info`;#| grep 'Manufacturer ID : 343' > /dev/null 2>&1"; $rc = $?; while ($rc != 0) { $sleepint = 10+int(rand(20)); print "Failure to reach IPMI device, retrying in $sleepint seconds (Hit Ctrl-E,c,o to skip)\n"; sleep $sleepint; - @mcinfo=`ipmitool -I lan -U $username -P $password -H $bmc mc info`;#| grep 'Manufacturer ID : 343' > /dev/null 2>&1"; + @mcinfo=`$ipmitool -I lan -U $username -P $password -H $bmc mc info`;#| grep 'Manufacturer ID : 343' > /dev/null 2>&1"; $rc = $?; } @@ -113,9 +117,9 @@ if ($isintel) { $inteloption=" -o intelplus"; } if ($iface eq "lanplus") { - system "ipmitool -I lanplus $inteloption -U $username -P $password -H $bmc $solcom deactivate"; #Stop any active session + system "$ipmitool -I lanplus $inteloption -U $username -P $password -H $bmc $solcom deactivate"; #Stop any active session } -exec "ipmitool -I $iface $inteloption -U $username -P $password -H $bmc $solcom activate"; +exec "$ipmitool -I $iface $inteloption -U $username -P $password -H $bmc $solcom activate";