summaryrefslogtreecommitdiffstats
path: root/perl-install/network/network.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-09-15 03:57:31 +0000
committerOlivier Blin <oblin@mandriva.org>2005-09-15 03:57:31 +0000
commita655e543314efbad3a1bd70e193b43f0ecb81300 (patch)
tree464652d330a07147dcf2b5d6204792345a6b980f /perl-install/network/network.pm
parent0846262df5150042d38accad44bb805cbc4945b6 (diff)
downloaddrakx-a655e543314efbad3a1bd70e193b43f0ecb81300.tar
drakx-a655e543314efbad3a1bd70e193b43f0ecb81300.tar.gz
drakx-a655e543314efbad3a1bd70e193b43f0ecb81300.tar.bz2
drakx-a655e543314efbad3a1bd70e193b43f0ecb81300.tar.xz
drakx-a655e543314efbad3a1bd70e193b43f0ecb81300.zip
drakconnect: write wireless settings in wireless.d/ as well
Diffstat (limited to 'perl-install/network/network.pm')
-rw-r--r--perl-install/network/network.pm16
1 files changed, 13 insertions, 3 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index d47d5b309..f9f0bd915 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -217,6 +217,12 @@ sub write_interface_conf {
write_interface_settings($intf, $file);
}
+sub write_wireless_conf {
+ my ($ssid, $ifcfg) = @_;
+ my $wireless_file = "$::prefix/etc/sysconfig/network-scripts/wireless.d/$ssid";
+ write_interface_settings($ifcfg, $wireless_file);
+}
+
sub add2hosts {
my ($hostname, @ips) = @_;
my ($sub_hostname) = $hostname =~ /(.*?)\./;
@@ -586,11 +592,15 @@ sub configure_network {
#- symlink resolv.conf in install root too so that updates and suppl media can be added
symlink "$::prefix/etc/resolv.conf", "/etc/resolv.conf";
}
- write_interface_conf($net, $_) foreach keys %{$net->{ifcfg}};
- network::ethernet::install_dhcp_client($in, $_->{DHCP_CLIENT}) foreach grep { $_->{BOOTPROTO} eq "dhcp" } values %{$net->{ifcfg}};
+ foreach (keys %{$net->{ifcfg}}) {
+ write_interface_conf($net, $_);
+ my $ssid = $net->{ifcfg}{$_}{WIRELESS_ESSID} or next;
+ write_wireless_conf($ssid, $net->{ifcfg}{$_});
+ }
+ network::ethernet::install_dhcp_client($in, $_->{DHCP_CLIENT}) foreach grep { $_->{BOOTPROTO} eq "dhcp" } values %{$net->{ifcfg}};
add2hosts("localhost", "127.0.0.1");
add2hosts($net->{network}{HOSTNAME}, "127.0.0.1") if $net->{network}{HOSTNAME};
- write_zeroconf($net, $in);
+ write_zeroconf($net, $in);
any { $_->{BOOTPROTO} =~ /^(pump|bootp)$/ } values %{$net->{ifcfg}} and $in->do_pkgs->install('pump');
}