summaryrefslogtreecommitdiffstats
path: root/perl-install/network/modem.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-06-03 07:14:48 +0000
committerOlivier Blin <oblin@mandriva.org>2005-06-03 07:14:48 +0000
commit8fc41a1333f01496878ca0561f3ca1ad186b6d64 (patch)
tree2dd030c580d5b8e954bce95508ac7ecacc6127b9 /perl-install/network/modem.pm
parent671adafbfbb78f044970bc4af895ed43dff99757 (diff)
downloaddrakx-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar
drakx-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.gz
drakx-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.bz2
drakx-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.xz
drakx-8fc41a1333f01496878ca0561f3ca1ad186b6d64.zip
- merge network settings in a $net hash (it modifies $o fields too):
o $netc becomes $net->{network} and $net->{resolv} o $intf becomes $net->{ifcfg} - move zeroconf config stuff in write_zeroconf - read_tmdns_conf -> read_zeroconf - read_all_conf -> read_net_conf - configureNetwork2 -> configure_network - configure_network: write ifcfg files for ppp interfaces too - don't install wireless-tools in configure_network, this package is in basesystem - most functions don't need the file path as an argument in network::network - drop network::tools::remove_initscript - don't export too much from network::network - don't export from network::tools - remove adsl_unsupported_eci step in drakconnect - drop passwd2 field in network::adsl - drop $net->{isdn_internal} - network::netconnect : main -> safe_main - use network::netconnect::real_main during install - don't read network config in network::netconnect::real_main - install_steps::upNetwork : resolv.conf is already symlinked by network::network::configure_network when appropriate - try to fix install_any::generate_automatic_stage1_params to use a real interface configuration - put authentication stuff in $net->{auth} - drop network::ethernet::write_ether_conf - drop network::adsl::get_wizard - use 'static' instead of 'manual' as ADSL method - drop first_modem and its workarounds in network::modem - drop deprecated "multiple_internet_cnx" step in drakconnect - don't save /etc/sysconfig/drakconnect anymore - drop MDK::Common::Globals stuff - drop getIP in net_applet (Pixel) - drop $netc->{DHCP} - configure_network(): write resolv.conf even if a dhcp interface is configured
Diffstat (limited to 'perl-install/network/modem.pm')
-rw-r--r--perl-install/network/modem.pm18
1 files changed, 3 insertions, 15 deletions
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm
index 6359069eb..f600db844 100644
--- a/perl-install/network/modem.pm
+++ b/perl-install/network/modem.pm
@@ -8,12 +8,6 @@ use detect_devices;
use mouse;
use network::tools;
-sub first_modem {
- my ($netc) = @_;
- return "/mnt/root" if $::isInstall;
- first(grep { $_->{device} =~ m!^/dev! } values %{$netc->{autodetect}{modem}});
-}
-
sub get_user_home() {
my $home;
if ($ENV{USER} ne "root") {
@@ -25,13 +19,8 @@ sub get_user_home() {
$home;
}
-sub ppp_read_conf {
- my ($netcnx, $netc) = @_;
- my $modem = $netcnx->{$netcnx->{type}} ||= {};
- if (my $detected_modem = first_modem($netc)) {
- $modem->{device} ||= $detected_modem->{device};
- }
- $modem->{device} ||= '/dev/modem';
+sub ppp_read_conf() {
+ my $modem = {};
my %l = getVarsFromSh(get_user_home() . "/.kde/share/config/kppprc");
add2hash(\%l, getVarsFromSh("$::prefix/usr/share/config/kppprc"));
$l{Authentication} = 4 if $l{Authentication} !~ /\d/;
@@ -58,14 +47,13 @@ sub ppp_read_conf {
$modem->{auto_gateway} ||= defined $modem->{Gateway} && $modem->{Gateway} ne '0.0.0.0' ? N("Manual") : N("Automatic");
$modem->{auto_ip} ||= defined $modem->{IPAddr} && $modem->{IPAddr} ne '0.0.0.0' ? N("Manual") : N("Automatic");
$modem->{auto_dns} ||= $modem->{dns1} || $modem->{dns2} ? N("Manual") : N("Automatic");
-
+ $modem->{device} ||= '/dev/modem';
$modem;
}
#-----modem conf
sub ppp_configure {
my ($in, $modem) = @_;
- $modem or return;
$in->do_pkgs->install('ppp') if !$::testing;
$in->do_pkgs->install('kdenetwork-kppp') if !$::testing && $in->do_pkgs->is_installed('kdebase');