Skip to content

Commit 1b53bb6

Browse files
FGroseLaszloGombos
authored andcommitted
fix(dracut-init.sh): use the local _ret variable
Use the local _ret variable when declared.
1 parent 273e481 commit 1b53bb6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

dracut-init.sh

+10-10
Original file line numberDiff line numberDiff line change
@@ -945,10 +945,10 @@ check_mount() {
945945

946946
if [[ " $dracutmodules $add_dracutmodules $force_add_dracutmodules" == *\ $_mod\ * ]]; then
947947
module_check_mount "$_mod" "$_moddir"
948-
ret=$?
948+
_ret=$?
949949

950-
# explicit module, so also accept ret=255
951-
[[ $ret == 0 || $ret == 255 ]] || return 1
950+
# explicit module, so also accept _ret=255
951+
[[ $_ret == 0 || $_ret == 255 ]] || return 1
952952
else
953953
# module not in our list
954954
if [[ $dracutmodules == all ]]; then
@@ -1012,22 +1012,22 @@ check_module() {
10121012
if [[ " $dracutmodules $add_dracutmodules $force_add_dracutmodules" == *\ $_mod\ * ]]; then
10131013
if [[ " $dracutmodules $force_add_dracutmodules " == *\ $_mod\ * ]]; then
10141014
module_check "$_mod" 1 "$_moddir"
1015-
ret=$?
1015+
_ret=$?
10161016
else
10171017
module_check "$_mod" 0 "$_moddir"
1018-
ret=$?
1018+
_ret=$?
10191019
fi
1020-
# explicit module, so also accept ret=255
1021-
[[ $ret == 0 || $ret == 255 ]] || return 1
1020+
# explicit module, so also accept _ret=255
1021+
[[ $_ret == 0 || $_ret == 255 ]] || return 1
10221022
else
10231023
# module not in our list
10241024
if [[ $dracutmodules == all ]]; then
10251025
# check, if we can and should install this module
10261026
module_check "$_mod" 0 "$_moddir"
1027-
ret=$?
1028-
if [[ $ret != 0 ]]; then
1027+
_ret=$?
1028+
if [[ $_ret != 0 ]]; then
10291029
[[ $2 ]] && return 1
1030-
[[ $ret != 255 ]] && return 1
1030+
[[ $_ret != 255 ]] && return 1
10311031
fi
10321032
else
10331033
# skip this module

0 commit comments

Comments
 (0)