From d7be7140e930e1df737c2795c87095f3cc50b1c9 Mon Sep 17 00:00:00 2001 From: rpm-build Date: Dec 10 2020 00:19:59 +0000 Subject: os-prober-mdraidfix.patch patch_name: os-prober-mdraidfix.patch present_in_specfile: true location_in_specfile: 2 --- diff --git a/os-prober b/os-prober index a48863e..8852887 100755 --- a/os-prober +++ b/os-prober @@ -69,6 +69,11 @@ partitions () { exit 0 fi + # Add MD RAID devices + if [ -f /proc/mdstat ] ; then + awk '/^md/ {printf "/dev/"$1"\n"}' /proc/mdstat + fi + # Also detect OSes on LVM volumes (assumes LVM is active) if type lvs >/dev/null 2>&1; then echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name | @@ -128,7 +133,7 @@ if [ -f /proc/swaps ]; then fi : >"$OS_PROBER_TMP/raided-map" if [ -f /proc/mdstat ] ; then - grep "^md" /proc/mdstat | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true + grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true fi for partition in $(partitions); do