From e636416bfe005de07ba535bcee837c88ebb35f97 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Tue, 8 Apr 2014 02:05:57 -0700 Subject: [PATCH] fix bug 4032: not single quoted in /opt/xcat/share/xcat/cons/ipmi --- xCAT-server/share/xcat/cons/ipmi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-server/share/xcat/cons/ipmi b/xCAT-server/share/xcat/cons/ipmi index ed0510b6c..2160556a0 100755 --- a/xCAT-server/share/xcat/cons/ipmi +++ b/xCAT-server/share/xcat/cons/ipmi @@ -98,10 +98,10 @@ 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"; +my @mcinfo=`$ipmitool -I lan -U $username -P '$password' -H $bmc mc info`;#| grep 'Manufacturer ID : 343' > /dev/null 2>&1"; $rc = $?; if ($rc) { #some shoddy vendors ignore the IPMI 2.0 requirement to support IPMI 1.5 formats for BMC capability determination, attempt IPMI 2.0 even without the ability to confirm IPMI 2.0 support. Though SOL was not baked in prior IPMI 2.0, this script supports pre-2.0 'ISOL' on older devices, hence why we are checking for 1.5/2.0 before proceeding normally - @mcinfo=`$ipmitool -I lanplus -U $username -P $password -H $bmc mc info`; + @mcinfo=`$ipmitool -I lanplus -U $username -P '$password' -H $bmc mc info`; $rc = $?; } while ($rc != 0) { @@ -109,10 +109,10 @@ while ($rc != 0) { print "Failure to reach IPMI device, retrying in $sleepint seconds (Hit Ctrl-E,c,o to skip)\n"; exec("sleep $sleepint"); #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 = $?; if ($rc) { #repeat workaround for shoddy vendors - @mcinfo=`$ipmitool -I lanplus -U $username -P $password -H $bmc mc info`; + @mcinfo=`$ipmitool -I lanplus -U $username -P '$password' -H $bmc mc info`; $rc = $?; } } @@ -130,9 +130,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";