From e463d4aa06089587dc3b277669b037e0e3353054 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 15 Feb 2005 18:49:13 +0000 Subject: allow to look for daemon after startup --- perl-install/network/activefw.pm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/perl-install/network/activefw.pm b/perl-install/network/activefw.pm index a06cfe392..e73806ae8 100644 --- a/perl-install/network/activefw.pm +++ b/perl-install/network/activefw.pm @@ -18,13 +18,20 @@ sub new { set_DBus_watch($con); $con->dispatch; - my $service = $bus->get_service("com.mandrakesoft.activefirewall.daemon"); - my $daemon = $service->get_object("/com/mandrakesoft/activefirewall", "com.mandrakesoft.activefirewall.daemon"); - - bless { + my $o = bless { bus => $bus, daemon => $daemon }, $type; + + $o->find_daemon; + + $o; +} + +sub find_daemon { + my ($o) = @_; + my $service = $o->{bus}->get_service("com.mandrakesoft.activefirewall.daemon"); + $o->{daemon} = $service->get_object("/com/mandrakesoft/activefirewall", "com.mandrakesoft.activefirewall.daemon"); } sub set_DBus_watch { -- cgit v1.2.1