ref: refs/heads/use-activeresource
commit a84b3f5702fea8f693313bb586cf404d68355b58
Author: Michal Zugec
Date: Wed Sep 16 16:15:53 2009 +0200
select first configured device
---
.../network/app/controllers/network_controller.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/plugins/network/app/controllers/network_controller.rb b/plugins/network/app/controllers/network_controller.rb
index 4f2b713..2e62adc 100644
--- a/plugins/network/app/controllers/network_controller.rb
+++ b/plugins/network/app/controllers/network_controller.rb
@@ -17,7 +17,7 @@ class NetworkController < ApplicationController
def index
@ifcs = load_proxy "org.opensuse.yast.modules.yapi.network.interfaces", :all
- @iface = params[:interface] || @ifcs[0].id #FIXME: first configured interface
+ @iface = params[:interface] || @ifcs.find {|i| i.bootproto!=nil}.id || @ifcs[0].id
ifc = load_proxy "org.opensuse.yast.modules.yapi.network.interfaces", @iface
return false unless ifc
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org