mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 11:42:05 +00:00
Merge pull request #2598 from chenglch/sendmsg
Add work aroud to replace sendmsg which is undefine method
This commit is contained in:
commit
b7e6687175
@ -16,6 +16,7 @@ use xCAT::Utils;
|
||||
use xCAT::TableUtils;
|
||||
use xCAT::NetworkUtils;
|
||||
use xCAT::PasswordUtils;
|
||||
use xCAT::MsgUtils;
|
||||
use XML::Simple;
|
||||
|
||||
BEGIN
|
||||
@ -852,7 +853,10 @@ sub windows_join_data {
|
||||
}
|
||||
unless ($adminuser and $adminpass) {
|
||||
my $passtab = xCAT::Table->new('passwd', -create => 0);
|
||||
unless ($passtab) { sendmsg([ 1, "Error authenticating to Active Directory" ], $node); return; }
|
||||
unless ($passtab) {
|
||||
xCAT::MsgUtils->message("SE", "[ERROR]$node: Error authenticating to Active Directory");
|
||||
return;
|
||||
}
|
||||
my @adpents = $passtab->getAttribs({ key => 'activedirectory' }, [ 'username', 'password', 'authdomain' ]);
|
||||
my $adpent;
|
||||
foreach $adpent (@adpents) {
|
||||
@ -1411,7 +1415,10 @@ sub machinepassword {
|
||||
$ENV{KRB5CCNAME} = "/tmp/xcat/krbcache.$realm.$$";
|
||||
unless ($loggedrealms{$realm}) {
|
||||
my $passtab = xCAT::Table->new('passwd', -create => 0);
|
||||
unless ($passtab) { sendmsg([ 1, "Error authenticating to Active Directory" ], $node); return; }
|
||||
unless ($passtab) {
|
||||
xCAT::MsgUtils->message("SE", "[ERROR]$node: Error authenticating to Active Directory");
|
||||
return;
|
||||
}
|
||||
my @adpents = $passtab->getAttribs({ key => 'activedirectory' }, [ 'username', 'password', 'authdomain' ]);
|
||||
my $adpent;
|
||||
my $username;
|
||||
@ -1452,7 +1459,7 @@ sub machinepassword {
|
||||
}
|
||||
}
|
||||
unless ($server) {
|
||||
sendmsg([ 1, "Unable to determine a directory server to communicate with, try site.directoryserver" ]);
|
||||
xCAT::MsgUtils->message("SE", "[ERROR]Unable to determine a directory server to communicate with, try site.directoryserver");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1589,7 +1596,7 @@ sub crydb
|
||||
$kp{$k} = $v if defined($k);
|
||||
}
|
||||
return \%kp if %kp;
|
||||
sendmsg([ 1, "Unable to parse password parameters $key" ]);
|
||||
xCAT::MsgUtils->message("SE", "[ERROR]Unable to parse password parameters $key");
|
||||
return undef;
|
||||
};
|
||||
$kp = $get_query_map->($key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user