diff --git a/perl-xCAT-2.0/xCAT/MacMap.pm b/perl-xCAT-2.0/xCAT/MacMap.pm index 3ef3aa00b..940367613 100755 --- a/perl-xCAT-2.0/xCAT/MacMap.pm +++ b/perl-xCAT-2.0/xCAT/MacMap.pm @@ -74,8 +74,6 @@ sub new { my $proto = shift; my $class = ref($proto) || $proto; - $self->{switchtab} = xCAT::Table->new('switch', -create => 1); - $self->{sitetab} = xCAT::Table->new('site'); bless ($self, $class); return $self; } @@ -111,8 +109,10 @@ sub find_mac { } sub refresh_table { - $self->{mactable}={}; my $self = shift; + $self->{mactable}={}; + $self->{switchtab} = xCAT::Table->new('switch', -create => 1); + $self->{sitetab} = xCAT::Table->new('site'); my $community = "public"; my $tmp = $self->{sitetab}->getAttribs({key=>'snmpc'},'value'); if ($tmp and $tmp->{value}) { $community = $tmp->{value} } diff --git a/xCAT-client-2.0/bin/rcons b/xCAT-client-2.0/bin/rcons index bd0cf19d5..ae36e033c 100755 --- a/xCAT-client-2.0/bin/rcons +++ b/xCAT-client-2.0/bin/rcons @@ -1,9 +1,9 @@ #!/bin/sh CONSERVER=`nodels $1 nodehm.conserver` -if [ -z $CONSERVER ]; then +if [ -z "$CONSERVER" ]; then CONSERVER=$XCATHOST fi -if [ -z $CONSERVER ]; then +if [ -z "$CONSERVER" ]; then CONSERVER=localhost fi #NOTE: IPv6 is not good with the below if going by IP, needs more sophisticated diff --git a/xCAT-client-2.0/xCAT-client.spec b/xCAT-client-2.0/xCAT-client.spec index a1b5fbc0d..baedd0e46 100644 --- a/xCAT-client-2.0/xCAT-client.spec +++ b/xCAT-client-2.0/xCAT-client.spec @@ -75,6 +75,7 @@ ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/chvm ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/tabgrep ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lsslp ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/tabdump +ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/packimage ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/makedns ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/gettab ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/sbin/nodeadd diff --git a/xCAT-server-2.0/sbin/xcatd b/xCAT-server-2.0/sbin/xcatd index 5c8620cb7..88a8a7386 100755 --- a/xCAT-server-2.0/sbin/xcatd +++ b/xCAT-server-2.0/sbin/xcatd @@ -20,6 +20,7 @@ if (xCAT::Utils->isLinux()) { eval { require IO::Socket::INET }; } +my $dispatch_requests = 1; # govern whether commands are dispatchable use IO::Socket; use IO::Handle; use IO::Select; @@ -219,7 +220,7 @@ sub do_udp_service { #This function opens up a UDP port #Also, this throttles to handle one message at a time, so no forking either #Explicitly, to handle whatever operations nodes periodically send during discover state #Could be used for heartbeating and such as desired - + $dispatch_requests=0; my $socket; my $select = new IO::Select; if (xCAT::Utils->isLinux()) { @@ -544,8 +545,11 @@ sub plugin_command { $req->{node}=\@nodes; } no strict "refs"; - dispatch_request($req,$callback,$modname); - #${"xCAT_plugin::".$modname."::"}{process_request}->($req,$callback,\&do_request); + if ($dispatch_requests) { + dispatch_request($req,$callback,$modname); + } else { + ${"xCAT_plugin::".$modname."::"}{process_request}->($req,$callback,\&do_request); + } $$progname=$oldprogname; if ($sock) { close($parent_fd);