From 939ef6edc6fb62922acafceb76139a0b0993fc3c Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 16:14:28 +0800
Subject: [PATCH] =?UTF-8?q?agent=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0?=
 =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=86=85=E6=A0=B8=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 sysmig_agent/fork.py | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/sysmig_agent/fork.py b/sysmig_agent/fork.py
index 3f81aea..cbc4165 100644
--- a/sysmig_agent/fork.py
+++ b/sysmig_agent/fork.py
@@ -225,4 +225,17 @@ def mig_modify_statue(task_id):
         ret = re.sub('[0-9]', '0', ret[0]) + ret[1]
         sql_mig_statue(ret)
     # loggea
-    '''
\ No newline at end of file
+    '''
+
+
+
+def get_info_version(data):
+    info = json.loads(data).get('info')
+    for i in range(len(info)):
+        agent_info = json.dumps(info[i])
+        ip = json.loads(agent_info).get('agent_ip')
+        agent_ip = get_local_ip()
+        if ip == agent_ip:
+            version = json.loads(agent_info).get('kernel_version')
+            return version
+
-- 
2.20.1

