From 0b73e58474d653def8257ab66faf8bfabc916a09 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 7 Jul 2005 07:44:35 +0000 Subject: add start/stop_ifplugd --- perl-install/network/tools.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'perl-install/network') diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 4be315700..9305fbd46 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -85,6 +85,17 @@ sub stop_net_interface { stop_interface($net->{net_interface}, $detach); } +sub start_ifplugd { + my ($interface) = @_; + run_program::run('/sbin/ifplugd', '-b', '-i', $interface); +} + +sub stop_ifplugd { + my ($interface) = @_; + my $ifplugd = chomp_(cat_("/var/run/ifplugd.$interface.pid")); + $ifplugd and kill(15, $ifplugd); +} + sub connected() { gethostbyname("mandrakesoft.com") ? 1 : 0 } # request a ref on a bg_connect and a ref on a scalar -- cgit v1.2.1