process os version and os name
This commit is contained in:
parent
16f0a77fda
commit
c355e004ec
38
0043-process-os-version-and-os-name.patch
Normal file
38
0043-process-os-version-and-os-name.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 1683b7dbd84ce4bdc399d3da731c9c5b22ed07fe Mon Sep 17 00:00:00 2001
|
||||
From: xuezhixin <xuezhixin@uniontech.com>
|
||||
Date: Fri, 10 Nov 2023 14:33:19 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=B3=BB=E7=BB=9F=E7=89=88?=
|
||||
=?UTF-8?q?=E6=9C=AC=E5=92=8C=E7=B3=BB=E7=BB=9F=E5=90=8D=E7=A7=B0?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
sysmig_agent/migration.py | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/sysmig_agent/migration.py b/sysmig_agent/migration.py
|
||||
index ebee24d..fec143a 100644
|
||||
--- a/sysmig_agent/migration.py
|
||||
+++ b/sysmig_agent/migration.py
|
||||
@@ -221,3 +221,17 @@ def get_old_osnameversion():
|
||||
return str(state)
|
||||
except:
|
||||
return None
|
||||
+
|
||||
+
|
||||
+def get_old_osname():
|
||||
+ nv = get_old_osnameversion()
|
||||
+ oldosname = re.sub(r'[0-9]', '', nv)
|
||||
+ return oldosname
|
||||
+
|
||||
+
|
||||
+def get_old_osversion():
|
||||
+ nv = get_old_osnameversion()
|
||||
+ oldosversion = re.sub(r'[A-Z,a-z]', '', nv)
|
||||
+ return oldosversion
|
||||
+
|
||||
+
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: migration-tools
|
||||
Version: 1.0.2
|
||||
Release: 42
|
||||
Release: 43
|
||||
License: MulanPSL-2.0
|
||||
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
@ -49,6 +49,8 @@ Patch39: 0039-repository-file-choose-kernel-version-to-migration.patch
|
||||
Patch40: 0040-intial-logfile-and-tmpfile.patch
|
||||
Patch41: 0041-get-migration-status-from-database.patch
|
||||
Patch42: 0042-get-initial-os-version-from-agent_info-interface.patch
|
||||
Patch43: 0043-process-os-version-and-os-name.patch
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: systemd
|
||||
@ -147,6 +149,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-43
|
||||
- 0043-process-os-version-and-os-name.patch
|
||||
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-42
|
||||
- 0042-get-initial-os-version-from-agent_info-interface.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user