Hello community,

here is the log from the commit of package yast2-isns for openSUSE:Factory 
checked in at 2014-06-10 14:38:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-isns (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-isns.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-isns"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-isns/yast2-isns.changes    2014-04-02 
17:26:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-isns.new/yast2-isns.changes       
2014-06-10 14:38:40.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Jun  5 11:23:03 CEST 2014 - [email protected]
+
+- correct name for firewall service, adjust 'isnsd' service start
+  (bnc #880173)
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ yast2-isns-3.1.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-isns-3.1.2/package/yast2-isns.changes 
new/yast2-isns-3.1.2/package/yast2-isns.changes
--- old/yast2-isns-3.1.2/package/yast2-isns.changes     2014-04-01 
11:37:49.000000000 +0200
+++ new/yast2-isns-3.1.2/package/yast2-isns.changes     2014-06-05 
13:38:32.000000000 +0200
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Thu Jun  5 11:23:03 CEST 2014 - [email protected]
+
+- correct name for firewall service, adjust 'isnsd' service start
+  (bnc #880173)
+
+-------------------------------------------------------------------
 Tue Apr  1 07:34:45 UTC 2014 - [email protected]
 
 - use new open-isns instead of dropped isns package (bnc#870453)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-isns-3.1.2/src/include/isns/dialogs.rb 
new/yast2-isns-3.1.2/src/include/isns/dialogs.rb
--- old/yast2-isns-3.1.2/src/include/isns/dialogs.rb    2014-04-01 
11:37:49.000000000 +0200
+++ new/yast2-isns-3.1.2/src/include/isns/dialogs.rb    2014-06-05 
13:38:32.000000000 +0200
@@ -124,7 +124,7 @@
           "help"          => Ops.get_string(@HELPS, "ipaddress", "")
         },
         "firewall"            => 
CWMFirewallInterfaces.CreateOpenFirewallWidget(
-          { "services" => ["isns-server"], "display_details" => true }
+          { "services" => ["service:isns"], "display_details" => true }
         ),
         "iscsi_nodes_display" => {
           "widget"        => :custom,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-isns-3.1.2/src/modules/IsnsServer.rb 
new/yast2-isns-3.1.2/src/modules/IsnsServer.rb
--- old/yast2-isns-3.1.2/src/modules/IsnsServer.rb      2014-04-01 
11:37:49.000000000 +0200
+++ new/yast2-isns-3.1.2/src/modules/IsnsServer.rb      2014-06-05 
13:38:32.000000000 +0200
@@ -28,6 +28,7 @@
       Yast.import "Mode"
       Yast.import "String"
       Yast.import "Map"
+      Yast.import "SystemdSocket"
 
       @serviceStatus = false
       @statusOnStart = false
@@ -46,6 +47,71 @@
       # Abort function
       # return boolean return true if abort
       @AbortFunction = fun_ref(method(:Modified), "boolean ()")
+
+      @isnsd_socket = nil
+    end
+
+    def isnsdSocketActive?
+      if @isnsd_socket
+        @isnsd_socket.active?
+      else
+        log.error("isnsd.socket not found")
+        false
+      end
+    end
+
+    def isnsdSocketStart
+      if @isnsd_socket
+        @isnsd_socket.start
+      else
+        log.error("isnsd.socket not found")
+        false
+      end
+    end
+
+    def isnsdSocketStop
+      if @isnsd_socket
+        @isnsd_socket.stop
+     else
+        log.error("isnsd.socket not found")
+        false
+      end
+    end
+
+    def isnsdSocketEnabled?
+      if @isnsd_socket
+        @isnsd_socket.enabled?
+      else
+        log.error("isnsd.socket not found")
+        false
+      end
+    end
+
+    def isnsdSocketDisabled?
+      if @isnsd_socket
+        @isnsd_socket.disabled?
+      else
+        log.error("isnsd.socket not found")
+        false
+      end
+    end
+
+    def isnsdSocketEnable
+      if @isnsd_socket
+        @isnsd_socket.enable
+      else
+        log.error("isnsd.socket not found")
+        false
+      end
+    end
+
+    def isnsdSocketDisable
+      if @isnsd_socket
+        @isnsd_socket.disable
+      else
+        log.error("isnsd.socket not found")
+        false
+      end
     end
 
     # Abort function
@@ -120,12 +186,27 @@
     # if not enabled, start it manually
     def getServiceStatus
       ret = true
-      if Service.Status("isns") == 0
+
+      # start service in stage initial (important for AutoYasT)
+      if Stage.initial
+        ret = Service.Start("isnsd")
+        if ret
+          log.info("Service isnsd started")
+        else
+          log.error("Cannot start service isnsd")
+        end
+        return ret
+      end
+
+      # start socket in installed system
+      @isnsd_socket = SystemdSocket.find!("isnsd")
+
+      if isnsdSocketActive?
         @statusOnStart = true
         @serviceStatus = true
       end
       Builtins.y2milestone("Service status = %1", @statusOnStart)
-      Service.Start("isns") if !@statusOnStart
+      isnsdSocketStart if !@statusOnStart
       ret
     end
 
@@ -135,12 +216,14 @@
       start = @statusOnStart if !@serviceStatus
 
       if !start
-        Builtins.y2milestone("Stop isns service")
-        Service.Stop("isns")
+        Builtins.y2milestone("Stop isnsd service and socket")
+        isnsdSocketStop
+        Service.Stop("isnsd")
       else
-        Builtins.y2milestone("Start isns service")
+        Builtins.y2milestone("Start isnsd socket")
+        Service.Stop("isnsd") if Service.Status("isnsd") == 0
         @serviceStatus = true
-        Service.Start("isns")
+        isnsdSocketStart
       end
       true
     end
@@ -367,7 +450,7 @@
     end
 
     def addISCSI(address, name, entityid)
-      Builtins.y2milestone("addDDS")
+      Builtins.y2milestone("addISCSI")
       command = Builtins.sformat(
         "isnsadm -a %1 -t -r iscsi -n '%2' -m '%3'",
         address,
@@ -635,7 +718,7 @@
 
     # get/set service accessors for CWMService component
     def GetStartService
-      status = Service.Enabled("isns")
+      status = isnsdSocketEnabled?
       Builtins.y2milestone("isns service status %1", status)
       status
     end
@@ -644,9 +727,9 @@
       Builtins.y2milestone("Set service status %1", status)
       @serviceStatus = status
       if status == true
-        Service.Enable("isns")
+        isnsdSocketEnable
       else
-        Service.Disable("isns")
+        isnsdSocketDisable
       end
 
       nil

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

Reply via email to