1 Star 0 Fork 23

tmacbb/initscripts

forked from src-openEuler/initscripts 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bugfix-mod-network-function-when-NM-unmanage-devices.patch 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
dogsheng 提交于 2019-12-14 14:35 +08:00 . Package init
From 482d36652a2f14ae7c2216e019d747a28c521d52 Mon Sep 17 00:00:00 2001
From: Lijie Yu <yulijie@huawei.com>
Date: Wed, 7 Mar 2018 16:56:50 +0800
Subject: [PATCH] initscripts: mod network-function for network when NM
unmanaged devices
[Changelog]:mod network-function for network when NM unmanaged devices
[Author]:yulijie
---
network-scripts/network-functions | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/network-scripts/network-functions b/network-scripts/network-functions
index 8deda57..00d5bdc 100644
--- a/network-scripts/network-functions
+++ b/network-scripts/network-functions
@@ -179,7 +179,9 @@ source_config ()
nm_con_load "$CONFIG"
if ! is_false $NM_CONTROLLED; then
UUID=$(get_uuid_by_config $CONFIG)
- [ -n "$UUID" ] && _use_nm=true
+ managed_strings=`nmcli dev show $DEVICE | grep STATE | grep unmanaged`
+ [ -z "$managed_strings" ] && is_device_managed=true
+ [ -n "$UUID" ] && [ "$is_device_managed"x = "true"x ] && _use_nm=true
fi
fi
}
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tmacbb/initscripts.git
git@gitee.com:tmacbb/initscripts.git
tmacbb
initscripts
initscripts
master

搜索帮助