summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/network/tools.pm11
1 files changed, 11 insertions, 0 deletions
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