2014-06-22 14:37:45 +02:00
|
|
|
From: Jeff Mahoney <jeffm@suse.com>
|
|
|
|
Subject: os-prober: call dmraid -r *once*
|
|
|
|
References: bnc#883453
|
|
|
|
|
|
|
|
os-prober calls dmraid -r -c unqualifed for every partition and then greps
|
|
|
|
the result. dmraid -r -c without a device list will scan every device
|
|
|
|
on the system. Every time. The results will not differ between runs.
|
|
|
|
|
|
|
|
This patch saves the results and performs the grep afterward.
|
|
|
|
|
|
|
|
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
|
|
---
|
|
|
|
os-prober | 8 +++++++-
|
|
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
|
2014-12-18 15:15:54 +01:00
|
|
|
Index: os-prober/os-prober
|
|
|
|
===================================================================
|
|
|
|
--- os-prober.orig/os-prober
|
|
|
|
+++ os-prober/os-prober
|
2014-06-22 14:37:45 +02:00
|
|
|
@@ -14,11 +14,17 @@ log_output () {
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
+: >"$OS_PROBER_TMP/dmraid-map"
|
|
|
|
+DMRAID=$(type dmraid >/dev/null 2>&1 || true)
|
|
|
|
+if [ -n "$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 dmraid -r -c | grep -q "$device"; then
|
|
|
|
+ if grep -q "$device" "$OS_PROBER_TMP/dmraid-map"; then
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
return 1
|