Changeset 411
- Timestamp:
- 11/16/11 00:29:53 (12 years ago)
- Location:
- tools/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/trunk/bin/sophie-rpm2
r405 r411 16 16 'l=s' => \my $login, 17 17 'p=s' => \my $pass, 18 't=s' => \my $type,19 18 'd=s' => \my @options, 20 19 'proxy' => \my $proxy, … … 43 42 login => $login, 44 43 password => $pass, 45 type => $type,46 44 proxy => $proxy, 47 45 ); -
tools/trunk/bin/sophie_notify
r410 r411 7 7 use Getopt::Long; 8 8 use Sophie::Client; 9 use Config::General; 9 10 10 11 $ENV{LC_ALL} = 'C'; 11 12 12 13 GetOptions( 13 'bdelay=i' => \my $updated_inotify, 14 'c=s' => \my $configfile, 15 'bdelay=i' => \my $updated_inotify, 14 16 'd|daemon' => \my $daemon, 15 17 'u|url=s' => \my $server, 18 'l=s' => \my $login, 19 'p=s' => \my $pass, 20 'proxy=s' => \my $proxy, 16 21 ) or die "Wrong options"; 22 23 $configfile ||= '/etc/sophie/sophie-notify.conf'; 24 25 if (-f $configfile && (my $conf = Config::General->new($configfile))) { 26 my %config = $conf->getall; 27 $server ||= $config{url}; 28 $login ||= $config{login}; 29 $pass ||= $config{pass}; 30 $proxy ||= $config{proxy}; 31 } 17 32 18 33 $updated_inotify ||= 500; … … 25 40 26 41 my $sc = Sophie::Client->new( 27 server => $server, 42 server => $server, 43 login => $login, 44 password => $pass, 45 proxy => $proxy, 28 46 ); 29 47 … … 47 65 $update = 0; 48 66 } 49 warn "$$ Inotify";50 67 if ($inotify) { 51 68 $inotify->poll; … … 66 83 %modified_paths = (); 67 84 } else { 68 warn "XML RPC error";85 #warn "XML RPC error"; 69 86 } 70 87 } … … 76 93 @paths = grep { -d $_ } map { $_->{path} } @{ $res->value }; 77 94 } else { 78 warn "XML RPC error";95 #warn "XML RPC error"; 79 96 } 80 97 } … … 82 99 83 100 sub inotify_path { 84 warn "inotify_path";85 101 my $i = Linux::Inotify2->new; 86 102 my $sub = sub { 87 103 my $e = shift; 88 warn $e->w->name;89 90 104 $modified_paths{$e->w->name} = 1; 91 105 notify_base(); -
tools/trunk/lib/Sophie/Client.pm
r410 r411 40 40 $options{login}, 41 41 $options{password}); 42 if (ref $res ) {42 if (ref $res && !$res->is_fault) { 43 43 $self->request->header('cookie', $$res); 44 44 return 1;
Note: See TracChangeset
for help on using the changeset viewer.