- Timestamp:
- Feb 15, 2010 8:51:46 AM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 6a8a9ec
- Parents:
- 3132419
- Location:
- fedkit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fedkit/active_config.pl
r3132419 rc3a3fe3 48 48 gateway_lib::wait_for_port($peer, 22, 60*60) || 49 49 die "ssh never came up on $peer\n"; 50 print "Making sure ssh permissions are reset\n"; 51 gateway_lib::testcmd_repeat("$ssh -o \"StrictHostKeyChecking no\" " . 52 "-i $ssh_privkey $peer ls", 5*60); 50 53 51 54 while (<$f>) { -
fedkit/gateway_lib.pm
r3132419 rc3a3fe3 339 339 } 340 340 341 sub testcmd_repeat { 342 my($cmd, $timeout, $sleep) = @_; 343 my $start = time(); 344 $sleep = 5 unless $sleep; 345 346 while (1) { 347 system("$cmd"); 348 if ($?) { 349 if ($timeout and time() - $start > $timeout) { 350 return undef; 351 } 352 else { sleep($sleep); } 353 } 354 else { return 1; } 355 } 356 } 341 357 342 358 1;
Note: See TracChangeset
for help on using the changeset viewer.