1 Star 0 Fork 107

zjut_zy/anaconda

forked from src-openEuler/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-adapt-active-connection-without-interface-name.patch 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
sun_hai 提交于 2023-07-09 21:36 . sync from sp2
From ade550fb89b10cf218ce96541e1c540a2a8a7ea1 Mon Sep 17 00:00:00 2001
From: sun_hai_10 <sunha10@huawei.com>
Date: Wed, 14 Dec 2022 11:04:41 +0800
Subject: [PATCH] adapt active connection without interface-name
---
pyanaconda/modules/network/initialization.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pyanaconda/modules/network/initialization.py b/pyanaconda/modules/network/initialization.py
index c7f0ba4..85a1da7 100644
--- a/pyanaconda/modules/network/initialization.py
+++ b/pyanaconda/modules/network/initialization.py
@@ -136,6 +136,9 @@ class ApplyKickstartTask(Task):
def _find_initramfs_connection_of_iface(self, nm_client, iface):
device = nm_client.get_device_by_iface(iface)
if device:
+ active_connection = device.get_active_connection()
+ if active_connection:
+ return active_connection.get_connection()
cons = device.get_available_connections()
for con in cons:
if con.get_interface_name() == iface and con.get_id() == iface:
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zjuzy/anaconda.git
git@gitee.com:zjuzy/anaconda.git
zjuzy
anaconda
anaconda
master

搜索帮助