8 Star 0 Fork 16

src-anolis-os/dracut

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0161.patch 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
From c2f193cc422eac475bbc17261413c83ff13172d4 Mon Sep 17 00:00:00 2001
From: Alexander Tsoy <alexander@tsoy.me>
Date: Mon, 25 May 2020 17:49:20 +0300
Subject: [PATCH] busybox: simplify listing of supported utilities
'--list' option is supported since busybox-1.20.0, which was released
in 2010.
(cherry picked from commit 50cc23ba32b0fda63eff7623b529dbeb4e6a38c6)
Resolves: #1959336
---
modules.d/05busybox/module-setup.sh | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/modules.d/05busybox/module-setup.sh b/modules.d/05busybox/module-setup.sh
index ecbd6a13..5d88c5d1 100755
--- a/modules.d/05busybox/module-setup.sh
+++ b/modules.d/05busybox/module-setup.sh
@@ -14,15 +14,16 @@ depends() {
# called by dracut
install() {
- local _i _progs _path _busybox
+ local _i _path _busybox
+ local _progs=()
_busybox=$(type -P busybox)
inst $_busybox /usr/bin/busybox
- for _i in $($_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}')
- do
- _progs="$_progs $_i"
+ for _i in $($_busybox --list); do
+ [[ ${_i} == busybox ]] && continue
+ _progs+=("${_i}")
done
- for _i in $_progs; do
+ for _i in "${_progs[@]}"; do
_path=$(find_binary "$_i")
[ -z "$_path" ] && continue
ln_r /usr/bin/busybox $_path
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

搜索帮助