ubuntu and debian ship SHA.pm instand of SHA1.pm

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16912 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2013-07-09 07:18:25 +00:00
parent b5f3b1b526
commit e5e572f940

View File

@ -46,13 +46,26 @@ use Digest::MD5 qw/md5/;
my $pendingpackets=0;
my %tabooseq; #TODO: this is a global which means one taboo in the whole set causes unrelated session objects to consider it taboo unnecessarily
my $maxpending; #determined dynamically based on rcvbuf detection
my $ipmi2support = eval {
require Digest::SHA1;
Digest::SHA1->import(qw/sha1/);
require Digest::HMAC_SHA1;
Digest::HMAC_SHA1->import(qw/hmac_sha1/);
1;
};
my $ipmi2support;
if ( -f "/etc/debian_release" ){
$ipmi2support = eval {
require Digest::SHA;
Digest::SHA->import(qw/sha1/);
require Digest::HMAC_SHA1;
Digest::HMAC_SHA1->import(qw/hmac_sha1/);
1;
};
}
else {
$ipmi2support = eval {
require Digest::SHA1;
Digest::SHA1->import(qw/sha1/);
require Digest::HMAC_SHA1;
Digest::HMAC_SHA1->import(qw/hmac_sha1/);
1;
};
}
my $aessupport;
if ($ipmi2support) {
$aessupport = eval {