Marcus Meissner
f596597b43
- Version bujmp to 1.65: * use latest in debian to be up par patch wise * Drop reiserfs, it's no longer supported. - we actually still support it as we patch this class away anyway, but still they have it in their changes... * Add ppc64el support. Closes: #752416. * Recognise the new ignore_uefi flag from partman-efi. - Refresh all patches to still apply: * os-prober-1.49-grub2-mount.patch * os-prober-call-dmraid-once.patch * os-prober-dont-load-all-fs-module-and-dont-test-mount.patch - Always delete all the .orig files as sometimes even upstream put them to tarball :) OBS-URL: https://build.opensuse.org/request/show/265202 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=47
39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
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(-)
|
|
|
|
Index: os-prober/os-prober
|
|
===================================================================
|
|
--- os-prober.orig/os-prober
|
|
+++ os-prober/os-prober
|
|
@@ -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
|