summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-07-07 07:44:35 +0000
committerOlivier Blin <oblin@mandriva.org>2005-07-07 07:44:35 +0000
commit0b73e58474d653def8257ab66faf8bfabc916a09 (patch)
tree11e700abc09b4e5e2cbfc275cac519ec358881dc /perl-install
parentf0f54fec1e8a3c7b8e24be3de3dc12deac4998dc (diff)
downloaddrakx-0b73e58474d653def8257ab66faf8bfabc916a09.tar
drakx-0b73e58474d653def8257ab66faf8bfabc916a09.tar.gz
drakx-0b73e58474d653def8257ab66faf8bfabc916a09.tar.bz2
drakx-0b73e58474d653def8257ab66faf8bfabc916a09.tar.xz
drakx-0b73e58474d653def8257ab66faf8bfabc916a09.zip
add start/stop_ifplugd
Diffstat (limited to 'perl-install')
-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