diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/network/ethernet.pm | 8 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 22 | ||||
-rw-r--r-- | perl-install/network/tools.pm | 10 | ||||
-rwxr-xr-x | perl-install/standalone/drakconnect | 4 |
4 files changed, 13 insertions, 31 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index a93d66c77..074fec628 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -21,14 +21,6 @@ sub write_ether_conf { $netcnx->{type} = 'lan'; $netcnx->{NET_DEVICE} = $netc->{NET_DEVICE} = ''; $netcnx->{NET_INTERFACE} = 'lan'; #$netc->{NET_INTERFACE}; - set_cnx_script($netc, "local network", -qq( -/etc/rc.d/init.d/network restart -), -qq( -/etc/rc.d/init.d/network stop -/sbin/ifup lo -), $netcnx->{type}); } $::isStandalone and $modules_conf->write; 1; diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 22069f39c..4a4810003 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -566,10 +566,6 @@ Take a look at http://www.linmodems.org"), pre => sub { $mouse ||= {}; $mouse->{device} ||= readlink "$::prefix/dev/mouse"; - set_cnx_script($netc, "modem", join("\n", if_($::testing, "/sbin/route del default"), "ifup ppp0"), - q(ifdown ppp0 -killall pppd -), $netcnx->{type}); }, name => N("Dialup: account options"), data => sub { @@ -786,7 +782,7 @@ If you don't know, choose 'use pppoe'"), return 'lan_intf'; } network::adsl::adsl_probe_info($netcnx, $netc, $adsl_type, $ntf_name); - $netc->{NET_DEVICE} = $ntf_name if $adsl_type eq 'pppoe'; + $netc->{$_} = $adsl_type eq 'pppoe' ? $ntf_name : 'ppp0' foreach 'NET_DEVICE', 'NET_INTERFACE'; return 'adsl_account'; }, }, @@ -815,10 +811,6 @@ If you don't know, choose 'use pppoe'"), post => sub { $netc->{internet_cnx_choice} = 'adsl'; network::adsl::adsl_conf_backend($in, $modules_conf, $netcnx, $netc, $ntf_name, $adsl_type, $netcnx); #FIXME - set_cnx_script($netc, "adsl", "ifup ppp0", - q(ifdown ppp0 -killall pppd -), $netcnx->{type}); $config->{adsl} = { kind => $ntf_name, protocol => $adsl_type }; $handle_multiple_cnx->(); }, @@ -958,13 +950,6 @@ notation (for example, 1.2.3.4).")), $ethntf->{MII_NOT_SUPPORTED} = bool2yesno(!$hotplug); $ethntf->{HWADDR} = $track_network_id or delete $ethntf->{HWADDR}; $in->do_pkgs->install($netc->{dhcp_client}) if $auto_ip; - set_cnx_script($netc, "cable", qq( -/sbin/ifup $netc->{NET_DEVICE} -), - qq( -/sbin/ifdown $netc->{NET_DEVICE} -), $netcnx->{type}) if $netcnx->{type} eq 'cable'; - return $is_wireless ? "wireless" : "static_hostname"; }, }, @@ -1236,8 +1221,7 @@ It is not necessary on most networks."), if ($a) { # local $::isWizard = 0; my $_w = $in->wait_message('', N("Testing your connection..."), 1); - # FIXME: drop cnx_scripts (still used for modem connexions), use ifup/ifdown instead - connect_backend(); + connect_backend($netc); my $s = 30; $type =~ /modem/ and $s = 50; $type =~ /adsl/ and $s = 35; @@ -1260,7 +1244,7 @@ Try to reconfigure your connection."); no_back => 1, end => 1, post => sub { - $::isInstall and disconnect_backend(); + $::isInstall and disconnect_backend($netc); return "end"; }, }, diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index bdfa8a13a..d3dc102f9 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -72,9 +72,15 @@ sub passwd_by_login { } } -sub connect_backend() { run_program::rooted($::prefix, "$connect_file &") } +sub connect_backend { + my ($netc) = @_; + run_program::rooted($::prefix, "ifup $netc->{NET_INTERFACE} &"); +} -sub disconnect_backend() { run_program::rooted($::prefix, "$disconnect_file &") } +sub disconnect_backend { + my ($netc) = @_; + run_program::rooted($::prefix, "ifdown $netc->{NET_INTERFACE} &"); +} sub connected() { gethostbyname("mandrakesoft.com") ? 1 : 0 } diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index cc01cfd34..d9726dd53 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -103,10 +103,10 @@ $int_connect->signal_connect(clicked => sub { if (cat_($network::tools::connect_prog) =~ m|/usr/bin/kppp| && -e '/usr/bin/kppp') { run_program::run("/usr/bin/kppp &"); } else { - connect_backend(); + connect_backend($netc); } } else { - disconnect_backend(); + disconnect_backend($netc); } }); |