ref: refs/heads/master
commit 530d2f662bece811d92e66247a6bab30c12ca6a0
Author: Michal Zugec
Date: Wed Sep 16 17:00:58 2009 +0200
delete empty configuration
---
plugins/network/app/models/interface.rb | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/plugins/network/app/models/interface.rb b/plugins/network/app/models/interface.rb
index d28c5b8..f23c88a 100644
--- a/plugins/network/app/models/interface.rb
+++ b/plugins/network/app/models/interface.rb
@@ -36,12 +36,16 @@ class Interface
# Saves data from model to system via YaPI. Saves only setted data,
# so it support partial safe (e.g. save only new timezone if rest of fields is not set).
def save
- settings = {
- @id => {
+ if @bootproto==""
+ settings = {@id=>{}}
+ else
+ settings = {
+ @id => {
"bootproto" => @bootproto,
"ipaddr" => @ipaddr
+ }
}
- }
+ end
vsettings = [ "a{sa{ss}}", settings ] # bnc#538050
YastService.Call("YaPI::NETWORK::Write",{"interface" => vsettings})
# TODO success or not?
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org