From 5cb435ee9047582166443cdfeb67c62ec50a5124 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 4 Mar 2008 20:28:07 +0000 Subject: [PATCH] Fix ipmi console script to read XCATCFG git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@674 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/share/xcat/cons/ipmi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xCAT-server-2.0/share/xcat/cons/ipmi b/xCAT-server-2.0/share/xcat/cons/ipmi index a1b8be87d..84e2181ec 100755 --- a/xCAT-server-2.0/share/xcat/cons/ipmi +++ b/xCAT-server-2.0/share/xcat/cons/ipmi @@ -5,6 +5,18 @@ BEGIN $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; } $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; +my $xcatcfg; +open($xcatcfg,"<","/etc/sysconfig/xcat"); +while (<$xcatcfg>) { + if (/^\s*XCATCFG/) { + (my $jnk,$ENV{XCATCFG})=split /=/,$_,2; + chomp($ENV{XCATCFG}); + $ENV{XCATCFG} =~ s/^'//; + $ENV{XCATCFG} =~ s/'$//; + last; + } +} +close($xcatcfg); use lib "$::XCATROOT/lib/perl"; use xCAT::Table; my $dba;