busybox: simplify listing of supported utilities
'--list' option is supported since busybox-1.20.0, which was released in 2010.master
parent
f769154bcc
commit
50cc23ba32
|
@ -14,15 +14,16 @@ depends() {
|
||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
install() {
|
install() {
|
||||||
local _i _progs _path _busybox
|
local _i _path _busybox
|
||||||
|
local _progs=()
|
||||||
_busybox=$(type -P busybox)
|
_busybox=$(type -P busybox)
|
||||||
inst $_busybox /usr/bin/busybox
|
inst $_busybox /usr/bin/busybox
|
||||||
for _i in $($_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}')
|
for _i in $($_busybox --list); do
|
||||||
do
|
[[ ${_i} == busybox ]] && continue
|
||||||
_progs="$_progs $_i"
|
_progs+=("${_i}")
|
||||||
done
|
done
|
||||||
|
|
||||||
for _i in $_progs; do
|
for _i in "${_progs[@]}"; do
|
||||||
_path=$(find_binary "$_i")
|
_path=$(find_binary "$_i")
|
||||||
[ -z "$_path" ] && continue
|
[ -z "$_path" ] && continue
|
||||||
ln_r /usr/bin/busybox $_path
|
ln_r /usr/bin/busybox $_path
|
||||||
|
|
Loading…
Reference in New Issue