8 Star 0 Fork 16

src-anolis-os/dracut

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0068.patch 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
From fa15223b70c04de0fdbd209a4bb1cb74876f7cfb Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <jonathan@jlebon.com>
Date: Wed, 19 Feb 2020 11:11:32 -0500
Subject: [PATCH] network-legacy/ifup: drop redundant if-statement
No need to check that `$ret` is 0, we're already running inside an
if-statement block which checks this.
(cherry picked from commit 7795fde44c54bfe753cc07999a4c2f9dd7e2820d)
Resolves: #1807395
---
modules.d/35network-legacy/ifup.sh | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh
index dd18d70b..eb7d2eb4 100755
--- a/modules.d/35network-legacy/ifup.sh
+++ b/modules.d/35network-legacy/ifup.sh
@@ -457,12 +457,10 @@ for p in $(getargs ip=); do
dhcp|on|any|dhcp6)
;;
*)
- if [ $ret -eq 0 ]; then
- setup_net $netif
- source_hook initqueue/online $netif
- if [ -z "$manualup" ]; then
- /sbin/netroot $netif
- fi
+ setup_net $netif
+ source_hook initqueue/online $netif
+ if [ -z "$manualup" ]; then
+ /sbin/netroot $netif
fi
;;
esac
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/dracut.git
git@gitee.com:src-anolis-os/dracut.git
src-anolis-os
dracut
dracut
a8

搜索帮助