Skip to content

Commit

Permalink
clone script update: hide xl domid test error message and remove newl…
Browse files Browse the repository at this point in the history
…ine after clone id
  • Loading branch information
tklengyel committed Sep 9, 2015
1 parent be53121 commit 5cbaeff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/clone.pl
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ sub clone {
die "0";
}

my $clone_test = `$xl domid $clone`;
my $clone_test = `$xl domid $clone 2>/dev/null`;
if(length $clone_test) {
`$xl destroy $clone`;
}
Expand All @@ -176,7 +176,7 @@ sub clone {
my $count = 0;
foreach $value (@values) {
if(index($value, "bridge")!=-1 && index($value, "vif-bridge")==-1) {
print $fh "bridge = $clone_bridge.$vlan, $vif_script";
print $fh "bridge=$clone_bridge.$vlan,$vif_script";
} else {
if(index($value, "script")==-1 && index($value, "backend")==-1) {
print $fh "$value";
Expand Down Expand Up @@ -227,6 +227,7 @@ sub clone {
`$mkfifo /tmp/drakvuf_pipe_$clone 2>&1`;
`$xl save -c $origin /tmp/drakvuf_pipe_$clone 2>&1 | $xl restore -p -e /tmp/$clone.config /tmp/drakvuf_pipe_$clone 2>&1`;
my $cloneID = `$xl domid $clone`;
chomp($cloneID);
print "$cloneID";
}

Expand Down

0 comments on commit 5cbaeff

Please sign in to comment.