diff options
author | Damien Chaumette <dchaumette@mandriva.com> | 2003-06-12 15:30:23 +0000 |
---|---|---|
committer | Damien Chaumette <dchaumette@mandriva.com> | 2003-06-12 15:30:23 +0000 |
commit | a014fc51b7d8e8cbab4e2496d559b6836568b046 (patch) | |
tree | 4aa794f37e21e44cc7cc14e21b430af91ad1d5a6 /perl-install/network/ethernet.pm | |
parent | afc9936cb3976692fc982d2a2464858ac38f9ad1 (diff) | |
download | drakx-backup-do-not-use-a014fc51b7d8e8cbab4e2496d559b6836568b046.tar drakx-backup-do-not-use-a014fc51b7d8e8cbab4e2496d559b6836568b046.tar.gz drakx-backup-do-not-use-a014fc51b7d8e8cbab4e2496d559b6836568b046.tar.bz2 drakx-backup-do-not-use-a014fc51b7d8e8cbab4e2496d559b6836568b046.tar.xz drakx-backup-do-not-use-a014fc51b7d8e8cbab4e2496d559b6836568b046.zip |
- drop $::Expert
- simplify code
Diffstat (limited to 'perl-install/network/ethernet.pm')
-rw-r--r-- | perl-install/network/ethernet.pm | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index a5aacee2e..b809639d8 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -17,30 +17,16 @@ use MDK::Common::Globals "network", qw($in $prefix); sub configure_cable { my ($netcnx, $netc, $intf, $first_time) = @_; -# $::isInstall and $in->set_help('configureNetworkCable'); + $netcnx->{type} = 'cable'; - - if ($::expert) { - my @m = ( - { description => "dhcp-client", - c => 1 }, - { description => "dhcpcd", - c => 3 }, - { description => "dhcpxd", - c => 4 }, - ); - if (my $f = $in->ask_from_listf(N("Connect to the Internet"), - N("Which dhcp client do you want to use? -Default is dhcp-client."), - sub { $_[0]{description} }, - \@m)) { - $f->{c} == 3 and $netcnx->{dhcp_client} = "dhcpcd" and $in->do_pkgs->install(qw(dhcpcd)); - $f->{c} == 4 and $netcnx->{dhcp_client} = "dhcpxd" and $in->do_pkgs->install(qw(dhcpxd)); - $f->{c} == 1 and $netcnx->{dhcp_client} = "dhcp-client" and $in->do_pkgs->install(qw(dhcp-client)); - } - } else { - $in->do_pkgs->install(qw(dhcp-client)); - } + + $in->ask_from(N("Connect to the Internet"), + N("Which dhcp client do you want to use ? (default is dhcp-client)"), + [ { val => \$netcnx->{dhcp_client}, list => ["dhcp-client", "dhcpcd", "dhcpxd"] } ], + ) or return; + + $in->do_pkgs->install($netcnx->{dhcp_client}); + go_ethernet($netc, $intf, 'dhcp', '', '', $first_time); write_cnx_script($netc, "cable", qq( |