diff --git a/xCAT-client/pods/man8/makeconservercf.8.pod b/xCAT-client/pods/man8/makeconservercf.8.pod index 231ad7ce7..9420aa48f 100644 --- a/xCAT-client/pods/man8/makeconservercf.8.pod +++ b/xCAT-client/pods/man8/makeconservercf.8.pod @@ -10,6 +10,8 @@ B [B<-V|--verbose>] [B<-l|--local>] B [B<-V|--verbose>] [B<-c|--conserver>] I +B [B<-V|--verbose>] I [B<-t|--trust>] I + B [B<-h|--help|-v|--version>] @@ -44,6 +46,11 @@ is set for nodes, the conserver gets set up only on the management node. Only run B locally and create the local /etc/conserver.cf. The default is to also run it on all service nodes, if there are any. +=item B<-t|--trust> I + +Add additional trusted hosts into /etc/conserver.cf. The I are comma separated list of +ip addresses or host names. + =item B<-v|--version> Display version. diff --git a/xCAT-server/lib/xcat/plugins/conserver.pm b/xCAT-server/lib/xcat/plugins/conserver.pm index f4f14ec0f..e71ddca8b 100644 --- a/xCAT-server/lib/xcat/plugins/conserver.pm +++ b/xCAT-server/lib/xcat/plugins/conserver.pm @@ -241,6 +241,16 @@ sub docfheaders { push @ips,$ip; } } + if ($::TRUSTED_HOST) + { + my @trusted_host = (split /,/, $::TRUSTED_HOST); + foreach my $tip (@trusted_host) + { + if(!grep(/^$tip$/, @ips)) { + push @ips,$tip; + } + } + } if(scalar(@ips) > 0) { my $ipstr = join(',', @ips); push @newheaders, " trusted $ipstr;\n"; @@ -285,7 +295,9 @@ sub makeconservercf { $Getopt::Long::ignorecase=0; #$Getopt::Long::pass_through=1; my $delmode; - GetOptions('d|delete' => \$delmode); + GetOptions('d|delete' => \$delmode, + 't|trust=s' => \$::TRUSTED_HOST + ); my $nodes = $req->{node}; my $svboot=0; if (exists($req->{svboot})) { $svboot=1;}