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
This commit is contained in:
jbjohnso 2008-03-04 20:28:07 +00:00
parent 26a15813fe
commit 5cb435ee90

View File

@ -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;