From f0bc50d27b6fbdcf211a870c3daa79f152e9b073 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Thu, 9 Aug 2012 03:58:34 +0000 Subject: [PATCH] for item: clean up Utils.pm, the code for xcatd. the thishostisnot function has been moved to NetworkUtils.pm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13463 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 2b85e3f70..fa5c7aef0 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -27,6 +27,8 @@ if ($^O =~ /^aix/i) { use lib "$::XCATROOT/lib/perl"; use Storable qw(freeze thaw); use xCAT::Utils; +use xCAT::TableUtils; +use xCAT::NetworkUtils; use xCAT::MsgUtils; use xCAT::xcatd; use File::Path; @@ -1444,7 +1446,7 @@ sub dispatch_request { if (ref $_->{'_xcatdest'} and (ref $_->{'_xcatdest'}) eq 'ARRAY') { _->{'_xcatdest'} = $_->{'_xcatdest'}->[0]; } - if ($onlyone and not ($_->{'_xcatdest'} and xCAT::Utils->thishostisnot($_->{'_xcatdest'}))) { + if ($onlyone and not ($_->{'_xcatdest'} and xCAT::NetworkUtils->thishostisnot($_->{'_xcatdest'}))) { $SIG{CHLD}='DEFAULT'; if ($_->{'_xcatdelay'} and not ref $_->{'_xcatdelay'}) { sleep $_->{'_xcatdelay'}; } ${"xCAT_plugin::".$modname."::"}{process_request}->($_,$dispatch_cb,\&do_request); @@ -1497,7 +1499,7 @@ sub dispatch_request { my $request_satisfied=0; foreach $xcatdest (@xcatdests) { my $dlock; - if ($xcatdest and xCAT::Utils->thishostisnot($xcatdest)) { + if ($xcatdest and xCAT::NetworkUtils->thishostisnot($xcatdest)) { #mkpath("/var/lock/xcat/"); #For now, limit intra-xCAT requests to one at a time, to mitigate DB handle usage #open($dlock,">","/var/lock/xcat/dispatchto_$xcatdest"); #flock($dlock,LOCK_EX);