From f478676446e9778c1b8fd90e1e63d785b933b8e7 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 26 Jun 2009 14:50:08 +0000 Subject: [PATCH] -Specify target noderange in some places where applicable in logs/ps output -Add a line feed to stdout type messages git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3651 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/MsgUtils.pm | 2 +- xCAT-server/sbin/xcatd | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/MsgUtils.pm b/perl-xCAT/xCAT/MsgUtils.pm index 305dd9dfa..5c4410a3b 100644 --- a/perl-xCAT/xCAT/MsgUtils.pm +++ b/perl-xCAT/xCAT/MsgUtils.pm @@ -407,7 +407,7 @@ sub message else { # print to stdout - print $stdouterrf $rsp; # print the message + print $stdouterrf $rsp."\n"; # print the message } } diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 44631e168..67edd1327 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1274,7 +1274,11 @@ sub service_connection { $req->{'_xcat_clienthost'} = [$peerhost]; $req->{'_xcat_clientfqdn'} = [$peerfqdn]; $req->{'_xcat_clientport'}= [$peerport]; - $$progname="xCATd SSL: ".$req->{command}->[0]." for ".($peername ? $peername ."@".$peerhost : $peerhost); + $$progname="xCATd SSL: ".$req->{command}->[0]; + if ($req->{noderange}) { + $$progname .= " to ".$req->{noderange}->[0]; + } + $$progname .= " for ".($peername ? $peername ."@".$peerhost : $peerhost); if ($req->{command}->[0] eq "authcheck") { #provide a method for UI to verify a user without actually requesting action my $resp; if ($peername or $peername eq "0") { @@ -1523,6 +1527,7 @@ sub validate { if ($rule->{rule}) { if ($rule->{rule} =~ /allow/i or $rule->{rule} =~ /accept/i) { my $logst = "xCAT: Allowing ".$request->{command}->[0]; + if ($request->{noderange}) { $logst .= " to ".$request->{noderange}->[0]; } if ($peername) { $logst .= " for " . $peername }; if ($peerhost) { $logst .= " from " . $peerhost }; xCAT::MsgUtils->message("S",$logst);