diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-09-06 11:23:59 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-09-06 11:23:59 +0000 |
commit | 5fdbde0aebb2708236e74ffc39d50b80d20a7b49 (patch) | |
tree | d5b35255eeca1226530344efd496a92e8fcc0664 | |
parent | 10baeff295c4782d7657b6c3f5b5fcaa700842b5 (diff) | |
download | drakx-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.pm | 5 |
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); |