dracut.sh: for_each_host_xx() function should indicate the empty case
master
Harald Hoyer 2017-12-06 14:49:42 +01:00 committed by GitHub
commit 2bdce3d461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -468,7 +468,8 @@ for_each_host_dev_fs()
local _dev
local _ret=1

[[ "${#host_fs_types[@]}" ]] || return 0
[[ "${#host_fs_types[@]}" ]] || return 2


for _dev in "${!host_fs_types[@]}"; do
$_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0
@ -527,7 +528,7 @@ for_each_host_dev_and_slaves_all()
local _dev
local _ret=1

[[ "${host_devs[@]}" ]] || return 0
[[ "${host_devs[@]}" ]] || return 2

for _dev in "${host_devs[@]}"; do
[[ -b "$_dev" ]] || continue
@ -543,7 +544,7 @@ for_each_host_dev_and_slaves()
local _func="$1"
local _dev

[[ "${host_devs[@]}" ]] || return 0
[[ "${host_devs[@]}" ]] || return 2

for _dev in "${host_devs[@]}"; do
[[ -b "$_dev" ]] || continue