Changeset 1252

Show
Ignore:
Timestamp:
02/22/08 15:13:25 (7 months ago)
Author:
kindlund
Message:

Updated cleanup code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/trunk/bin/cleanup_broken_clients.pl

    r1251 r1252  
    2323my $clients = HoneyClient::Manager::Database::get_broken_clients($args); 
    2424 
    25 #my ($cid, $id); 
    2625while (my ($cid, $id) = each %{$clients}) { 
    2726 
    2827    $LOG->info("Deleting VM (" . $cid . ")"); 
    2928 
    30     print "Executing: vmware-cmd -s unregister " . $datastore_path . "/" . $cid . "/*.vmx\n"
     29    $LOG->info("Executing: vmware-cmd -s unregister " . $datastore_path . "/" . $cid . "/*.vmx")
    3130    system("vmware-cmd -s unregister " . $datastore_path . "/" . $cid . "/*.vmx"); 
    3231 
    33     print "Executing: vmware-cmd -s unregister " . $datastore_path . "/" . $cid . "/*.cfg\n"
     32    $LOG->info("Executing: vmware-cmd -s unregister " . $datastore_path . "/" . $cid . "/*.cfg")
    3433    system("vmware-cmd -s unregister " . $datastore_path . "/" . $cid . "/*.cfg"); 
    3534     
    36     print "Executing: rm -rf " . $datastore_path . "/" . $cid . "\n"
     35    $LOG->info("Executing: rm -rf " . $datastore_path . "/" . $cid)
    3736    system("rm -rf " . $datastore_path . "/" . $cid); 
    3837 
    39     print "Executing: rm -f " . $snapshot_path . "/" . $cid . "*\n"
     38    $LOG->info("Executing: rm -f " . $snapshot_path . "/" . $cid . "*")
    4039    system("rm -f " . $snapshot_path . "/" . $cid . "*"); 
    4140