/[Sack]/trunk/lib/Sack/Server.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Sack/Server.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 175 by dpavlin, Tue Nov 3 18:02:33 2009 UTC revision 176 by dpavlin, Fri Nov 6 10:48:19 2009 UTC
# Line 9  use IO::Select; Line 9  use IO::Select;
9  use Data::Dump qw(dump);  use Data::Dump qw(dump);
10  use Storable qw();  use Storable qw();
11  use File::Slurp;  use File::Slurp;
12    use Cwd qw(abs_path);
13    
14  my @cloud = qw(localhost tab.lan llin.lan);  my @cloud = qw(localhost tab.lan llin.lan);
15    
# Line 20  warn "# cloud ",dump( @cloud ); Line 21  warn "# cloud ",dump( @cloud );
21    
22  my $listen_port = 4444;  my $listen_port = 4444;
23    
24  my $node_path = $0;  my $node_path = abs_path $0;
25  $node_path =~ s{server.pl}{client.pl};  $node_path =~ s{server.pl}{client.pl};
26    
27  my $lsn = IO::Socket::INET->new(Listen => 1, LocalPort => $listen_port, Reuse => 1) or die $!;  my $lsn = IO::Socket::INET->new(Listen => 1, LocalPort => $listen_port, Reuse => 1) or die $!;
# Line 54  sub fork_node { Line 55  sub fork_node {
55  my $node_port = 4000;  my $node_port = 4000;
56    
57  foreach my $host ( @cloud ) {  foreach my $host ( @cloud ) {
58          system "echo $node_path | cpio --create --dereference | ssh -T -F $cloud_path.ssh $host cpio --extract --make-directories --unconditional --verbose";          system "find /srv/Sack/ | cpio --create --dereference | ssh -T -F $cloud_path.ssh $host cpio --extract --make-directories --unconditional";
59          fork_node( $node_port++, $host );          fork_node( $node_port++, $host );
60  }  }
61    

Legend:
Removed from v.175  
changed lines
  Added in v.176

  ViewVC Help
Powered by ViewVC 1.1.26