From b149ee71639fd02ce0213d4168562055a455388f Mon Sep 17 00:00:00 2001 From: janw Date: Mon, 28 Jan 2008 13:18:16 +0000 Subject: [PATCH] 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 --- gosa-si/modules/ArpHandler.pm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) 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; -- 2.30.2