load sha.pm on ubuntu instand of sha1.pm

This commit is contained in:
xq2005 2013-08-05 01:26:15 -07:00
parent 008e72d316
commit a7e3e9ec2a
2 changed files with 8 additions and 16 deletions

View File

@ -21,10 +21,13 @@ use File::Path;
use Socket;
use strict;
use Symbol;
my $sha1support = eval {
require Digest::SHA1;
1;
};
my $sha1support;
if ( -f "/etc/debian_version" ){
$sha1support = eval {require Digest::SHA; 1;};
}
else {
$sha1support = eval { require Digest::SHA1; 1;};
}
use IPC::Open3;
use IO::Select;
use xCAT::GlobalDef;

View File

@ -21,12 +21,7 @@ set -e
case "$1" in
configure)
. /etc/profile.d/xcat.sh
if [ ! -e "/etc/rc0.d/K60xcatd" ];then
update-rc.d xcatd start 85 2 3 4 5 . stop 60 0 1 6 .
update-rc.d xcatd enable 2
else
update-rc.d xcatd enable
fi
update-rc.d xcatd defaults
if [ -f /tmp/xCAT-server_upgrade.tmp ]; then
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
/etc/init.d/xcatd reload
@ -36,12 +31,6 @@ case "$1" in
ln -sf /opt/xcat/sbin/xcatd /usr/sbin/xcatd
#SHA1 has been get rid of after Squeeze released. Its functionality is also provided by Digest::SHA (which is in core).
#but ipmi.pm need SHA1.pm, so create this link
shalocate=`find /usr/lib/perl -name "SHA.pm"`
shalocate=${shalocate%SHA.pm}
cd $shalocate
if [ ! -e SHA1.pm ];then
ln -s SHA.pm SHA1.pm
fi
cd -
;;