summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-07-27 10:01:29 +0000
committerOlivier Blin <oblin@mandriva.org>2005-07-27 10:01:29 +0000
commitda079982e86d69b6a844b265096515bf0951cdce (patch)
treea24b19946cf2518ba15fc248cd12b539af6f9ac2 /perl-install
parent285bfa245a09463bba48da4eadff4b9220d13552 (diff)
downloaddrakx-da079982e86d69b6a844b265096515bf0951cdce.tar
drakx-da079982e86d69b6a844b265096515bf0951cdce.tar.gz
drakx-da079982e86d69b6a844b265096515bf0951cdce.tar.bz2
drakx-da079982e86d69b6a844b265096515bf0951cdce.tar.xz
drakx-da079982e86d69b6a844b265096515bf0951cdce.zip
allow to run drakids
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/standalone/net_applet10
1 files changed, 7 insertions, 3 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet
index 6e404188b..6a03b85a5 100644
--- a/perl-install/standalone/net_applet
+++ b/perl-install/standalone/net_applet
@@ -56,6 +56,7 @@ my %actions = (
'upNetwork' => { name => sub { N("Connect %s", $_[0]) }, launch => sub { network::tools::start_interface($_[0], 1) } },
'downNetwork' => { name => sub { N("Disconnect %s", $_[0]) }, launch => sub { network::tools::stop_interface($_[0], 1) } },
'monitorNetwork' => { name => N("Monitor Network"), launch => \&run_net_monitor },
+ 'monitorAFW' => { name => N("Active Firewall"), launch => \&run_drakids },
'wireless' => { name => N("Manage wireless networks"), launch => \&run_drakroam },
'confNetwork' => { name => N("Configure Network"), launch => sub { system("/usr/sbin/drakconnect --skip-wizard &") } },
'chooseInterface' => {
@@ -138,12 +139,15 @@ sub shouldStart() {
}
return getAutoStart();
}
-sub run_net_monitor() {
+sub run_net_monitor() {
run_program::raw({ detach => 1 }, '/usr/sbin/net_monitor', '--defaultintf', $current_interface) unless is_running('net_monitor');
}
-sub run_drakroam() {
+sub run_drakroam() {
run_program::raw({ detach => 1 }, '/usr/sbin/drakroam') unless is_running('drakroam');
}
+sub run_drakids() {
+ run_program::raw({ detach => 1 }, '/usr/sbin/drakids') unless is_running('drakids');
+}
sub generate_wireless_menuitem {
my ($net) = @_;
$net->{menuitem} = Gtk2::CheckMenuItem->new;
@@ -257,7 +261,7 @@ sub generate_menu {
my $has_wireless = detect_devices::has_wireless();
if ($state_type eq 'connected') {
- push @actions, $create_item->($_) foreach qw(downNetwork monitorNetwork);
+ push @actions, $create_item->($_) foreach qw(downNetwork monitorNetwork monitorAFW);
} elsif ($state_type eq 'disconnected') {
push @actions, $menu->append($create_item->('upNetwork'));
}