From 2e77eb6c5fcb29d375cd43853dfd9fbac4810e94 Mon Sep 17 00:00:00 2001 From: mellor Date: Tue, 18 Dec 2007 18:24:16 +0000 Subject: [PATCH] fixed blade console support: relocateable perl lib, typos git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@187 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/share/xcat/cons/blade | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xCAT-server-2.0/share/xcat/cons/blade b/xCAT-server-2.0/share/xcat/cons/blade index 609c33293..a1b74a4f1 100755 --- a/xCAT-server-2.0/share/xcat/cons/blade +++ b/xCAT-server-2.0/share/xcat/cons/blade @@ -1,5 +1,11 @@ #!/usr/bin/env perl # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html +BEGIN +{ + $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; +} +use lib "$::XCATROOT/lib/perl"; + use xCAT::Table; use File::Basename; my $scriptname = $0; @@ -33,8 +39,8 @@ $slot = $dba->{id}; if ($mpatab) { ($dba) = $mpatab->getAttribs({mpa=>$mm},qw(username password)); if ($dba) { - if ($dba->{username}) { $username = $dba->username; } - if ($dba->{password}) { $password = $dba->password; } + if ($dba->{username}) { $username = $dba->{username}; } + if ($dba->{password}) { $password = $dba->{password}; } } } sleep 5;