46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
|
|
From be2eee80486e06dc4cfe097fa10d2254df5800c4 Mon Sep 17 00:00:00 2001
|
||
|
|
From: xuezhixin <xuezhixin@uniontech.com>
|
||
|
|
Date: Mon, 13 Nov 2023 14:00:33 +0800
|
||
|
|
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=A3=80=E6=B5=8B=E7=9A=84?=
|
||
|
|
=?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF?=
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
---
|
||
|
|
sysmig_agent/Abisystmcompchk.py | 21 +++++++++++++++++++++
|
||
|
|
1 file changed, 21 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
|
||
|
|
index 913fef1..43a4594 100644
|
||
|
|
--- a/sysmig_agent/Abisystmcompchk.py
|
||
|
|
+++ b/sysmig_agent/Abisystmcompchk.py
|
||
|
|
@@ -546,3 +546,24 @@ def get_cur_sys_version():
|
||
|
|
fp.close()
|
||
|
|
return line.split('=', 1)[1].replace('"', '').replace('\n', '')
|
||
|
|
|
||
|
|
+
|
||
|
|
+def get_migration_sys_info():
|
||
|
|
+
|
||
|
|
+ behind_sys_info = exp_rst_dir + 'before-system-info.txt'
|
||
|
|
+ with open(behind_sys_info, 'r') as file_object:
|
||
|
|
+ behind_list_info = file_object.readlines()
|
||
|
|
+
|
||
|
|
+ migration_sys_info = '1|2|' + get_cur_sys_version()
|
||
|
|
+ behind_list_info.append(migration_sys_info)
|
||
|
|
+
|
||
|
|
+ #20220107 modify lihp: get kernel version
|
||
|
|
+ #migration_kernel_verison = '2|2|' + platform.release()
|
||
|
|
+ migration_kernel_verison = '2|2|' + platform_release('1')
|
||
|
|
+ behind_list_info.append(migration_kernel_verison)
|
||
|
|
+
|
||
|
|
+ with open(migration_system_install, 'r') as frm:
|
||
|
|
+ install_pkgs_num = str(len(frm.readlines()))
|
||
|
|
+ behind_list_info.append('8|2|' + install_pkgs_num)
|
||
|
|
+
|
||
|
|
+ return behind_list_info
|
||
|
|
+
|
||
|
|
--
|
||
|
|
2.20.1
|
||
|
|
|