Skip to content

Commit

Permalink
fix(mdraid): allow UUID comparison for more than one UUID
Browse files Browse the repository at this point in the history
If the system provides more than one UUID, the _MD_UUID var
contains a line break after each UUID. Therefore the strstr
function could not find any UUID, caused by the additional
spaces provided to the function.

Furthermore this could lead to a boot interruption, because
the start of a degraded raid1 won't be executed. So, manual
interaction is necessary.
  • Loading branch information
Alexander Wenzel authored and haraldh committed Nov 24, 2021
1 parent 8104bf0 commit d364ce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules.d/90mdraid/mdraid_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ _md_force_run() {
_UUID=$(str_replace "$_UUID" ":" "")

# check if we should handle this device
strstr " $_MD_UUID " " $_UUID " || continue
strstr "$_MD_UUID" "$_UUID" || continue

_md_start "${_md}"
done
Expand Down

0 comments on commit d364ce8

Please sign in to comment.