summaryrefslogtreecommitdiffstats
path: root/perl-install/network/ethernet.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-03-09 16:44:43 +0000
committerOlivier Blin <oblin@mandriva.org>2005-03-09 16:44:43 +0000
commitce971f65c6ba5901b3ec57da501b45b78fab256d (patch)
tree1d8d8527283b6017094bbe069822e6b62c5dd54b /perl-install/network/ethernet.pm
parente4b00449f014c0e2000e360114634a24bde6899d (diff)
downloaddrakx-ce971f65c6ba5901b3ec57da501b45b78fab256d.tar
drakx-ce971f65c6ba5901b3ec57da501b45b78fab256d.tar.gz
drakx-ce971f65c6ba5901b3ec57da501b45b78fab256d.tar.bz2
drakx-ce971f65c6ba5901b3ec57da501b45b78fab256d.tar.xz
drakx-ce971f65c6ba5901b3ec57da501b45b78fab256d.zip
write selected dhcp client in ifcfg files
Diffstat (limited to 'perl-install/network/ethernet.pm')
-rw-r--r--perl-install/network/ethernet.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 3932cb332..d2a32e54e 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -9,7 +9,19 @@ use common;
use run_program;
use network::tools;
-our @dhcp_clients = qw(dhcp-client dhcpcd pump dhcpxd);
+our @dhcp_clients = qw(dhclient dhcpcd pump dhcpxd);
+
+sub install_dhcp_client {
+ my ($in, $ethntf) = @_;
+ my %packages = (
+ "dhclient" => "dhcp-client",
+ );
+ my $client = $ethntf->{DHCP_CLIENT};
+ #- use default dhcp client if none is provided
+ $client ||= $dhcp_clients[0];
+ $client = $packages{$client} if exists $packages{$client};
+ $in->do_pkgs->install($client);
+}
sub write_ether_conf {
my ($in, $modules_conf, $netcnx, $netc, $intf) = @_;