Hello community,

here is the log from the commit of package yast2-network for openSUSE:Factory 
checked in at 2013-11-26 06:16:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-network (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-network.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-network"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes      
2013-11-21 15:26:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 
2013-11-26 06:16:30.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Nov 25 13:29:43 UTC 2013 - [email protected]
+
+- add installation client that detect all DHCP capable network
+  cards and set it up
+- 3.1.8
+
+-------------------------------------------------------------------

Old:
----
  yast2-network-3.1.7.tar.bz2

New:
----
  yast2-network-3.1.8.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.g2jb8T/_old  2013-11-26 06:16:30.000000000 +0100
+++ /var/tmp/diff_new_pack.g2jb8T/_new  2013-11-26 06:16:30.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.7
+Version:        3.1.8
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-network-3.1.7.tar.bz2 -> yast2-network-3.1.8.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.7/VERSION 
new/yast2-network-3.1.8/VERSION
--- old/yast2-network-3.1.7/VERSION     2013-11-20 10:58:44.000000000 +0100
+++ new/yast2-network-3.1.8/VERSION     2013-11-25 15:17:24.000000000 +0100
@@ -1 +1 @@
-3.1.7
+3.1.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.7/package/yast2-network.changes 
new/yast2-network-3.1.8/package/yast2-network.changes
--- old/yast2-network-3.1.7/package/yast2-network.changes       2013-11-20 
10:58:44.000000000 +0100
+++ new/yast2-network-3.1.8/package/yast2-network.changes       2013-11-25 
15:17:24.000000000 +0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Mon Nov 25 13:29:43 UTC 2013 - [email protected]
+
+- add installation client that detect all DHCP capable network
+  cards and set it up
+- 3.1.8
+
+-------------------------------------------------------------------
 Wed Nov 20 08:50:16 UTC 2013 - [email protected]
 
 - removed automatic 2nd stage support (the 2nd stage has been
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.7/package/yast2-network.spec 
new/yast2-network-3.1.8/package/yast2-network.spec
--- old/yast2-network-3.1.7/package/yast2-network.spec  2013-11-20 
10:58:44.000000000 +0100
+++ new/yast2-network-3.1.8/package/yast2-network.spec  2013-11-25 
15:17:24.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-network
-Version:        3.1.7
+Version:        3.1.8
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-network-3.1.7/src/clients/inst_setup_dhcp.rb 
new/yast2-network-3.1.8/src/clients/inst_setup_dhcp.rb
--- old/yast2-network-3.1.7/src/clients/inst_setup_dhcp.rb      1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-network-3.1.8/src/clients/inst_setup_dhcp.rb      2013-11-25 
15:17:24.000000000 +0100
@@ -0,0 +1,60 @@
+Yast.import "LanItems"
+Yast.import "NetworkInterfaces"
+
+include Yast
+
+BASH_PATH = Path.new(".target.bash")
+
+def network_cards
+  LanItems.Read
+  LanItems.GetNetcardNames
+end
+
+def setup_dhcp card
+  index = LanItems.FindDeviceIndex(card)
+
+  if index == -1
+    raise "Failed to save configuration for device #{card}"
+  end
+
+  LanItems.current = index
+  LanItems.SetItem
+
+  #tricky part if ifcfg is not set
+  # yes, this code smell and show bad API of LanItems
+  if !LanItems.IsCurrentConfigured
+    NetworkInterfaces.Add
+    current = LanItems.Items[LanItems.current]
+    current["ifcfg"] = card
+  end
+
+  LanItems.bootproto = "dhcp"
+  LanItems.startmode = "auto"
+
+  LanItems.Commit
+end
+
+def get_lease?(card)
+  SCR.Execute(BASH_PATH, "dhcpcd-test '#{card}'") == 0
+end
+
+def start_dhcp(card)
+  SCR.Execute(BASH_PATH, "dhcpcd '#{card}'") == 0
+end
+
+def write_configuration
+  NetworkInterfaces.Write("")
+end
+
+
+# TODO time consuming, some progress would be nice
+dhcp_cards = network_cards.select { |c| get_lease?(c) }
+
+dhcp_cards.each do |dcard|
+  setup_dhcp(dcard) # make DHCP setup persistent
+  start_dhcp(dcard)
+end
+
+write_configuration
+
+:next

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to