1 Star 0 Fork 16

sys0613/dracut

forked from src-anolis-os/dracut 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0071.patch 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
From 02c096d138cc8c788daf5fae75408059cbc7e283 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Mon, 2 Dec 2019 02:19:51 +0100
Subject: [PATCH] network-manager: don't run NetworkManager when there are no
connections
NetworkManager would unnecessarily bring up the devices, colliding with
further attempts to rename the devices.
This is arguably a NetworkManager bug and should eventually be fixed there.
Running NetworkManager without the connection is unnecessary regardless.
(cherry picked from commit 5965710e018989b02a56e8d190b71740ca3b5463)
Resolves: #1826061
---
modules.d/35network-manager/nm-run.sh | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/modules.d/35network-manager/nm-run.sh b/modules.d/35network-manager/nm-run.sh
index b33e0992..4079b735 100755
--- a/modules.d/35network-manager/nm-run.sh
+++ b/modules.d/35network-manager/nm-run.sh
@@ -1,10 +1,17 @@
#!/bin/sh
-if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
- /usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace
-else
- /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
-fi
+for i in /usr/lib/NetworkManager/system-connections/* \
+ /run/NetworkManager/system-connections/* \
+ /etc/NetworkManager/system-connections/* \
+ /etc/sysconfig/network-scripts/ifcfg-*; do
+ [ -f "$i" ] || continue
+ if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
+ /usr/sbin/NetworkManager --configure-and-quit=initrd --debug --log-level=trace
+ else
+ /usr/sbin/NetworkManager --configure-and-quit=initrd --no-daemon
+ fi
+ break
+done
for _i in /sys/class/net/*
do
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sys0613/dracut.git
git@gitee.com:sys0613/dracut.git
sys0613
dracut
dracut
a8

搜索帮助