summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-09-06 11:23:59 +0000
committerOlivier Blin <oblin@mandriva.org>2004-09-06 11:23:59 +0000
commit5fdbde0aebb2708236e74ffc39d50b80d20a7b49 (patch)
treed5b35255eeca1226530344efd496a92e8fcc0664
parent10baeff295c4782d7657b6c3f5b5fcaa700842b5 (diff)
downloaddrakx-5fdbde0aebb2708236e74ffc39d50b80d20a7b49.tar
drakx-5fdbde0aebb2708236e74ffc39d50b80d20a7b49.tar.gz
drakx-5fdbde0aebb2708236e74ffc39d50b80d20a7b49.tar.bz2
drakx-5fdbde0aebb2708236e74ffc39d50b80d20a7b49.tar.xz
drakx-5fdbde0aebb2708236e74ffc39d50b80d20a7b49.zip
(ppp_read_conf) use /dev/modem if no modem was detected (do not crash
when we edit a connection whose modem is unplugged)
-rw-r--r--perl-install/network/modem.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm
index 91e047066..0ce904902 100644
--- a/perl-install/network/modem.pm
+++ b/perl-install/network/modem.pm
@@ -17,7 +17,10 @@ sub first_modem {
sub ppp_read_conf {
my ($netcnx, $netc) = @_;
my $modem = $netcnx->{$netcnx->{type}} ||= {};
- $modem->{device} ||= first_modem($netc)->{device};
+ if (my $detected_modem = first_modem($netc)) {
+ $modem->{device} ||= $detected_modem->{device};
+ }
+ $modem->{device} ||= '/dev/modem';
my %l = getVarsFromSh("$::prefix/usr/share/config/kppprc");
$l{Authentication} = 4 if !exists $l{Authentication};
$modem->{$_} ||= $l{$_} foreach qw(Authentication Gateway IPAddr SubnetMask);