diff --git a/perl-xCAT-2.0/xCAT/NotifHandler.pm b/perl-xCAT-2.0/xCAT/NotifHandler.pm index eed381999..9a2208b1b 100644 --- a/perl-xCAT-2.0/xCAT/NotifHandler.pm +++ b/perl-xCAT-2.0/xCAT/NotifHandler.pm @@ -18,8 +18,8 @@ require Data::Dumper; # 'd'=>[filename,...] # } # } -%notif; -$masterpid; +my %notif; +my $masterpid; 1; @@ -213,7 +213,7 @@ sub dumpNotificationCache { =cut #------------------------------------------------------------------------------- sub needToNotify { - if (!defined %notif) { + if (!%notif) { # print "notif not defined\n"; refreshNotification(); } diff --git a/perl-xCAT-2.0/xCAT/Schema.pm b/perl-xCAT-2.0/xCAT/Schema.pm index f5a081206..57069b06f 100644 --- a/perl-xCAT-2.0/xCAT/Schema.pm +++ b/perl-xCAT-2.0/xCAT/Schema.pm @@ -605,22 +605,22 @@ my @nodeattrs = ( #################### # iscsi table # #################### - {attr_name => iscsiserver, + {attr_name => 'iscsiserver', only_if => 'nodetype=osi', tabentry => 'iscsi.server', access_tabentry => 'iscsi.node=attr:node', }, - {attr_name => iscsitarget, + {attr_name => 'iscsitarget', only_if => 'nodetype=osi', tabentry => 'iscsi.target', access_tabentry => 'iscsi.node=attr:node', }, - {attr_name => iscsiuserid, + {attr_name => 'iscsiuserid', only_if => 'nodetype=osi', tabentry => 'iscsi.userid', access_tabentry => 'iscsi.node=attr:node', }, - {attr_name => iscsipassword, + {attr_name => 'iscsipassword', only_if => 'nodetype=osi', tabentry => 'iscsi.passwd', access_tabentry => 'iscsi.node=attr:node', @@ -728,22 +728,22 @@ my @nodeattrs = ( #################### # ppchcp table # #################### - {attr_name => username, + {attr_name => 'username', only_if => 'nodetype=ivm', tabentry => 'ppchcp.username', access_tabentry => 'ppchcp.hcp=attr:node', }, - {attr_name => password, + {attr_name => 'password', only_if => 'nodetype=ivm', tabentry => 'ppchcp.password', access_tabentry => 'ppchcp.hcp=attr:node', }, - {attr_name => username, + {attr_name => 'username', only_if => 'nodetype=hmc', tabentry => 'ppchcp.username', access_tabentry => 'ppchcp.hcp=attr:node', }, - {attr_name => password, + {attr_name => 'password', only_if => 'nodetype=hmc', tabentry => 'ppchcp.password', access_tabentry => 'ppchcp.hcp=attr:node', @@ -751,36 +751,36 @@ my @nodeattrs = ( #################### # ppc table # #################### - {attr_name => hcp, + {attr_name => 'hcp', only_if => 'mgt=hmc', tabentry => 'ppc.hcp', access_tabentry => 'ppc.node=attr:node', }, - {attr_name => hcp, + {attr_name => 'hcp', only_if => 'mgt=ivm', tabentry => 'ppc.hcp', access_tabentry => 'ppc.node=attr:node', }, - {attr_name => id, + {attr_name => 'id', only_if => 'mgt=hmc', tabentry => 'ppc.id', access_tabentry => 'ppc.node=attr:node', }, - {attr_name => id, + {attr_name => 'id', only_if => 'mgt=ivm', tabentry => 'ppc.id', access_tabentry => 'ppc.node=attr:node', }, - {attr_name => pprofile, + {attr_name => 'pprofile', tabentry => 'ppc.pprofile', access_tabentry => 'ppc.node=attr:node', }, - {attr_name => parent, + {attr_name => 'parent', only_if => 'mgt=hmc', tabentry => 'ppc.parent', access_tabentry => 'ppc.node=attr:node', }, - {attr_name => parent, + {attr_name => 'parent', only_if => 'mgt=ivm', tabentry => 'ppc.parent', access_tabentry => 'ppc.node=attr:node', @@ -788,12 +788,12 @@ my @nodeattrs = ( ####################### # ppcdirect table # ####################### - {attr_name => username, + {attr_name => 'username', only_if => 'mgt=fsp', tabentry => 'ppcdirect.username', access_tabentry => 'ppcdirect.hcp=attr:node', }, - {attr_name => password, + {attr_name => 'password', only_if => 'mgt=fsp', tabentry => 'ppcdirect.password', access_tabentry => 'ppcdirect.hcp=attr:node', @@ -801,17 +801,17 @@ my @nodeattrs = ( ################## # ipmi table # ################## - {attr_name => bmc, + {attr_name => 'bmc', only_if => 'mgt=ipmi', tabentry => 'ipmi.bmc', access_tabentry => 'ipmi.node=attr:node', }, - {attr_name => bmcusername, + {attr_name => 'bmcusername', only_if => 'mgt=ipmi', tabentry => 'ipmi.username', access_tabentry => 'ipmi.node=attr:node', }, - {attr_name => bmcpassword, + {attr_name => 'bmcpassword', only_if => 'mgt=ipmi', tabentry => 'ipmi.password', access_tabentry => 'ipmi.node=attr:node', @@ -819,12 +819,12 @@ my @nodeattrs = ( ################ # mp table # ################ - {attr_name => mpa, + {attr_name => 'mpa', only_if => 'mgt=blade', tabentry => 'mp.mpa', access_tabentry => 'mp.node=attr:node', }, - {attr_name => id, + {attr_name => 'id', only_if => 'mgt=blade', tabentry => 'mp.id', access_tabentry => 'mp.node=attr:node', @@ -832,12 +832,12 @@ my @nodeattrs = ( ################# # mpa table # ################# - {attr_name => username, + {attr_name => 'username', only_if => 'nodetype=mm', tabentry => 'mpa.username', access_tabentry => 'mpa.mpa=attr:node', }, - {attr_name => password, + {attr_name => 'password', only_if => 'nodetype=mm', tabentry => 'mpa.password', access_tabentry => 'mpa.mpa=attr:node', diff --git a/perl-xCAT-2.0/xCAT/Utils.pm b/perl-xCAT-2.0/xCAT/Utils.pm index 4e92663e3..fc2901ab4 100644 --- a/perl-xCAT-2.0/xCAT/Utils.pm +++ b/perl-xCAT-2.0/xCAT/Utils.pm @@ -426,7 +426,7 @@ sub get_site_attribute my $sitetab = xCAT::Table->new('site'); if ($sitetab) { - (my $ref) = $sitetab->getAttribs({key => $attr}, value); + (my $ref) = $sitetab->getAttribs({key => $attr}, 'value'); if ($ref and $ref->{value}) { $values = $ref->{value}; @@ -817,7 +817,7 @@ rmdir(\"/tmp/.ssh\");"; # send the keys to the nodes # my $cmd = "$::REMOTESHELL_EXPECT -s $n_str"; - my $rc = system("$cmd") >> 8; + $rc = system("$cmd") >> 8; if ($rc) { my %rsp;