summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-19 23:36:01 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-19 23:36:01 +0000
commitea483315f8086a40f0e7585f66903b151cecb367 (patch)
tree9b0af5a2f614e3a0e8946ccee01469dcaace61be /perl-install/network
parent8f3c90ba4d2febc45a8a97c284b3aa34ca8b0bdf (diff)
downloaddrakx-ea483315f8086a40f0e7585f66903b151cecb367.tar
drakx-ea483315f8086a40f0e7585f66903b151cecb367.tar.gz
drakx-ea483315f8086a40f0e7585f66903b151cecb367.tar.bz2
drakx-ea483315f8086a40f0e7585f66903b151cecb367.tar.xz
drakx-ea483315f8086a40f0e7585f66903b151cecb367.zip
- kill duplicated code
- move some code where it belongs so that it's shared by isdn/modem
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/netconnect.pm13
1 files changed, 2 insertions, 11 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index b430de621..f0d113963 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -400,12 +400,6 @@ Take a look at http://www.linmodems.org"),
[ { label => N("Modem"), type => "list", val => \$modem, list => [ keys %{$netc->{autodetect}{modem}} ], allow_empty_list => 1 } ],
},
post => sub {
- $mouse ||= {};
- $mouse->{device} ||= readlink "$::prefix/dev/mouse";
- write_cnx_script($netc, "modem", join("\n", if_($::testing, "/sbin/route del default"), "ifup ppp0"), q(
-ifdown ppp0
-killall pppd
-), $netcnx->{type});
$ntf_name = $netc->{autodetect}{modem}{$modem}{device} || $netc->{autodetect}{modem}{$modem}{description};
print "Interface is $ntf_name\n";
@@ -438,11 +432,6 @@ killall pppd
choose_serial_port =>
{
- pre => sub {
- $mouse ||= {};
- $mouse->{device} ||= readlink "$::prefix/dev/mouse";
- },
-
name => N("Please choose which serial port your modem is connected to."),
interactive_help_id => 'selectSerialPort',
data => [ { var => \$modem->{device}, format => \&mouse::serial_port2text, type => "list",
@@ -454,6 +443,8 @@ killall pppd
ppp_choose =>
{
pre => sub {
+ $mouse ||= {};
+ $mouse->{device} ||= readlink "$::prefix/dev/mouse";
write_cnx_script($netc, "modem", join("\n", if_($::testing, "/sbin/route del default"), "ifup ppp0"),
q(ifdown ppp0
killall pppd