Changeset 407 for honeyclient/branches/exp/kindlund-filesystem/bin
- Timestamp:
- 05/29/07 22:12:36 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
honeyclient/branches/exp/kindlund-filesystem/bin/StartAgent.pl
r396 r407 7 7 use Carp (); 8 8 9 use HoneyClient::Util::Config qw(getVar); 9 10 use HoneyClient::Agent; 10 11 use HoneyClient::Util::SOAP qw(getClientHandle); … … 12 13 use MIME::Base64 qw(decode_base64 encode_base64); 13 14 use Storable qw(thaw nfreeze); 15 use Log::Log4perl qw(:easy); 16 17 # The global logging object. 18 our $LOG = get_logger(); 14 19 15 20 our ($stub, $som); … … 37 42 38 43 if (!$faultDetected) { 39 print "Watchdog fault detected, recovering Agent daemon.\n";44 $LOG->error("Watchdog fault detected, recovering Agent daemon."); 40 45 $faultDetected = 1; 41 46 } 42 47 # XXX: Reenable this, eventually. 43 #Carp::carp __PACKAGE__ . "->_watchdogFaultHandler(): Error occurred during processing.\n" . $errMsg; 48 $LOG->error(__PACKAGE__ . "->_watchdogFaultHandler(): Error occurred during processing.\n" . $errMsg); 49 Carp::carp __PACKAGE__ . "->_watchdogFaultHandler(): Error occurred during processing.\n" . $errMsg; 44 50 45 51 46 52 # Regardless of the error, destroy the Agent process and reinitialize it. 47 53 # XXX: Sanity check this, eventually. 48 #HoneyClient::Agent->destroy();54 HoneyClient::Agent->destroy(); 49 55 50 56 # Wait for a small amount of time, in order for the killed process to release 51 57 # its control of the bound TCP port. 52 #sleep 5;58 sleep 5; 53 59 54 #$URL = HoneyClient::Agent->init();60 $URL = HoneyClient::Agent->init(); 55 61 56 62 # Restore state information. 57 #$som = $stub->updateState(encode_base64(nfreeze($agentState)));63 $som = $stub->updateState(encode_base64(nfreeze($agentState))); 58 64 } 59 65
