From 25e02c8b73fe0898c8f2492201db24b1e20d8959 Mon Sep 17 00:00:00 2001 From: lissav Date: Thu, 13 Mar 2014 09:50:10 -0400 Subject: [PATCH] change sync of keys so they are cleaned up when zones are removed --- xCAT-server/lib/xcat/plugins/xdsh.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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