Commit ebf32d6e authored by Philip Hands's avatar Philip Hands

fixup! os-prober: call dmraid -r *once*

parent 78e7bdf6
Pipeline #7545 failed with stages
in 13 seconds
......@@ -14,16 +14,16 @@ log_output () {
fi
}
: >"$OS_PROBER_TMP/dmraid-map"
DMRAID=$(type dmraid >/dev/null 2>&1 || true)
if [ "$DMRAID" ]; then
dmraid -r -c >"$OS_PROBER_TMP/dmraid-map"
fi
on_sataraid () {
type dmraid >/dev/null 2>&1 || return 1
local parent="${1%/*}"
local device="/dev/${parent##*/}"
if grep -q "$device" "$OS_PROBER_TMP/dmraid-map"; then
local mapcache="$OS_PROBER_TMP/dmraid-map"
[ -f "$mapcache" ] ||
dmraid -r -c >"$mapcache" 2>/dev/null || true
if grep -q "$device" "$mapcache"; then
return 0
fi
return 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment