Permalink
Browse files

fix some bugs that turned up on the live system

  • Loading branch information...
1 parent 0a0bb43 commit 7406a967cef8f0bfeb0a3051f1244f10b8eaac6f @asquared committed Jun 13, 2012
Showing with 8 additions and 4 deletions.
  1. +1 −1 concerto_config_server.rb
  2. +7 −3 netconfig.rb
@@ -246,7 +246,7 @@ def do_assign(params, instance)
params.each do |param, value|
if safe.include? param.intern
- instance.public_send((param + '=').intern, value)
+ instance.send((param + '=').intern, value)
end
end
end
View
@@ -228,7 +228,7 @@ def scan_interfaces
}
if first_with_medium
- first_with_medium
+ first_with_medium.name
else
# if we get here no interface was found with a cable attached
# default to eth0 and hope for the best
@@ -255,7 +255,11 @@ def config_interface_name
# Otherwise, just pick the first wlan interface, assuming
# it works and all wlan interfaces have approximately equal
# reception. When this assumption is wrong the user must force.
- @interface_name || self.class.interfaces[0].name
+ if @interface_name && @interface_name != ''
+ @interface_name
+ else
+ self.class.interfaces[0].name
+ end
end
def validate
@@ -272,7 +276,7 @@ def write_configs
# Write a wpa_supplicant.conf file for an unsecured network.
File.open(@wpa_config_file, 'w') do |wpaconf|
# long lines, sorry!
- wpaconf.puts "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel"
+ wpaconf.puts "ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev"
wpaconf.puts "network={"
wpaconf.puts "ssid=\"#{@ssid}\""
wpaconf.puts "scan_ssid=1"

0 comments on commit 7406a96

Please sign in to comment.