/[cwmp]/google/trunk/bin/acs.pl
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 /google/trunk/bin/acs.pl

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

revision 197 by dpavlin, Mon Nov 12 22:03:01 2007 UTC revision 223 by dpavlin, Sat Nov 24 02:17:40 2007 UTC
# Line 8  use strict; Line 8  use strict;
8    
9  use lib './lib';  use lib './lib';
10  use CWMP::Server;  use CWMP::Server;
11    use CWMP::Session;
12    use CWMP::Vendor;
13  use Getopt::Long;  use Getopt::Long;
14    use Data::Dump qw/dump/;
15    use File::Find;
16    
17  my $port = 3333;  my $port = 3333;
18  my $debug = 0;  my $debug = 0;
19  my $store_path = './';  my $store_path = './';
20  my $store_plugin = 'YAML';  my $store_plugin = 'YAML';
21    my $create_dump = 1;
22    
23  GetOptions(  GetOptions(
24          'debug+' => \$debug,          'debug+' => \$debug,
25          'port=i' => \$port,          'port=i' => \$port,
26          'store-path=s' => \$store_path,          'store-path=s' => \$store_path,
27          'store-plugin=s' => \$store_plugin,          'store-plugin=s' => \$store_plugin,
28            'create_dump!' => \$create_dump,
29  );  );
30    
31    if ( $create_dump ) {
32            warn "## cleaning dump directory\n" if $debug;
33            find({
34                    wanted => sub {
35                            my $path = $File::Find::name;
36                            return if -d $path;
37                            unlink($path) || die "can't remove $path: $!";
38                            warn "## removed $path\n" if $debug;
39                    },
40                    no_chdir => 1,
41            }, 'dump/' );
42    }
43    
44  my $server = CWMP::Server->new({  my $server = CWMP::Server->new({
45          port => $port,          port => $port,
46          store => {          session => {
47                  module => $store_plugin,                  store => {
48                  path => $store_path,                          module => $store_plugin,
49                  debug => $debug,                          path => $store_path,
50                            debug => $debug,
51                    },
52                    create_dump => $create_dump,
53          },          },
54          debug => $debug,          debug => $debug,
55  });  });
56    
57    CWMP::Vendor->add_triggers;
58    
59  $server->run();  $server->run();
60    

Legend:
Removed from v.197  
changed lines
  Added in v.223

  ViewVC Help
Powered by ViewVC 1.1.26