diff --git a/xCAT-server/lib/xcat/plugins/xdsh.pm b/xCAT-server/lib/xcat/plugins/xdsh.pm index 4b09f211e..e08d985a7 100644 --- a/xCAT-server/lib/xcat/plugins/xdsh.pm +++ b/xCAT-server/lib/xcat/plugins/xdsh.pm @@ -1061,7 +1061,7 @@ sub syncSNZoneKeys my $file="/tmp/xcatzonesynclist"; # Run xdcp -F /tmp/xcatzonesynclist # can leave it , never changes and is built each time - my $content= "\"/etc/xcat/sshkeys/* -> /etc/xcat/sshkeys/\""; + my $content= "\"/etc/xcat/sshkeys/ -> /etc/xcat/sshkeys/\""; `echo $content > $file`; # xdcp rsync the file @@ -1081,7 +1081,7 @@ sub syncSNZoneKeys @::good_SN = @sn; # initialize all good # run the command to the servicenodes - # xdcp -F + # xdcp -o "--delete" -F my $addreq; $addreq->{'_xcatdest'} = $::mnname; $addreq->{node} = \@sn; @@ -1092,6 +1092,8 @@ sub syncSNZoneKeys push (@{$addreq->{arg}},"--nodestatus"); # return nodestatus } push (@{$addreq->{arg}},"-v"); + push (@{$addreq->{arg}},"-o"); + push (@{$addreq->{arg}},"--delete"); # will cleanup the directory if zones are removed push (@{$addreq->{arg}},"-F"); push (@{$addreq->{arg}},$file); $addreq->{command}->[0] = "xdcp"; # input command is xdsh, but we need to run xdcp -F