diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/network/network.pm | 16 | ||||
-rwxr-xr-x | perl-install/standalone/drakroam | 3 |
2 files changed, 14 insertions, 5 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'); } diff --git a/perl-install/standalone/drakroam b/perl-install/standalone/drakroam index 5294cfbd4..6b605ff1a 100755 --- a/perl-install/standalone/drakroam +++ b/perl-install/standalone/drakroam @@ -136,8 +136,7 @@ sub configure_ap { my $ssid = $essid || $ap; $net->{wireless}{$ssid} = $wireless_net; - my $wireless_file = "/etc/sysconfig/network-scripts/wireless.d/$ssid"; - network::network::write_interface_settings($wireless_net, $wireless_file); + network::network::write_wireless_conf($ssid, $wireless_net); if ($has_roaming) { #- this should be handled by the monitoring daemon instead |