From f7174a54861866279a2a231969221a0ebd5c515e Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 3 Apr 2008 04:00:18 +0000 Subject: rewrite for next commit --- lib/network/network.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/network/network.pm b/lib/network/network.pm index 827e567..0654f36 100644 --- a/lib/network/network.pm +++ b/lib/network/network.pm @@ -227,9 +227,11 @@ sub write_interface_conf { sub write_wireless_conf { my ($ssid, $ifcfg) = @_; my $wireless_file = $::prefix . $wireless_d . '/' . $ssid; - write_interface_settings($ifcfg, $wireless_file); - # FIXME: write only DHCP/IP settings here - substInFile { $_ = '' if /^DEVICE=/ } $wireless_file; + my %wireless_ifcfg = %$ifcfg; + # FIXME: be smarter to keep only DHCP/IP settings here + delete $wireless_ifcfg{$_} + foreach qw(DEVICE); + write_interface_settings(\%wireless_ifcfg, $wireless_file); } sub add2hosts { -- cgit v1.2.1