From: janw Date: Mon, 28 Jan 2008 13:18:16 +0000 (+0000) Subject: Added capability to define multiple specific interfaces (comma or space separated... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b149ee71639fd02ce0213d4168562055a455388f;p=gosa.git Added capability to define multiple specific interfaces (comma or space separated or both). git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8619 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/modules/ArpHandler.pm b/gosa-si/modules/ArpHandler.pm index 63ccb1df8..1590572a7 100644 --- a/gosa-si/modules/ArpHandler.pm +++ b/gosa-si/modules/ArpHandler.pm @@ -66,16 +66,20 @@ sub get_module_info { } } } else { - &main::daemon_log("Starting ArpWatch on $interface", 1); - POE::Session->create( - inline_states => { - _start => \&start, - _stop => sub { - $_[KERNEL]->post( sprintf("arp_watch_$interface") => 'shutdown' ) + foreach my $device(split(/[\s,]+/, $interface)) { + &main::daemon_log("Starting ArpWatch on $device", 1); + POE::Session->create( + inline_states => { + _start => sub { + &start(@_,$device); + }, + _stop => sub { + $_[KERNEL]->post( sprintf("arp_watch_$device") => 'shutdown' ) + }, + got_packet => \&got_packet, }, - got_packet => \&got_packet, - }, - ); + ); + } } return \@info;