Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP4:FactoryCandidates
os-prober
os-prober-btrfs-multiple-device.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File os-prober-btrfs-multiple-device.patch of Package os-prober
Index: os-prober-1.76/os-prober =================================================================== --- os-prober-1.76.orig/os-prober +++ os-prober-1.76/os-prober @@ -161,6 +161,15 @@ fi : >"$OS_PROBER_TMP/btrfs-vols" +btrfsrootdev=$(sed -n -e 's!\([^\s]\+\)\s\+\(/\|/target/boot\|/target\)\s\+btrfs!\1!p;ta;b;:a;q' "$OS_PROBER_TMP/mounted-map") +if [ -n "$btrfsrootdev" ] ; then + if btrfsrootdev="$(mapdevfs "$btrfsrootdev")"; then + btrfsrootdevuuid=$(blkid -o value -s UUID "$btrfsrootdev") + debug "btrfs is mounted as root, uuid: $btrfsrootdevuuid" + echo "$btrfsrootdevuuid" >>"$OS_PROBER_TMP/btrfs-vols" + fi +fi + for partition in $(partitions); do if ! mapped="$(mapdevfs "$partition")"; then log "Device '$partition' does not exist; skipping" @@ -183,13 +192,9 @@ for partition in $(partitions); do # be handled by 50mounted-tests so we can do a subvol only once. type=$(blkid -o value -s TYPE $mapped || true) if [ "$type" = btrfs ]; then - mpoint=$(grep "^$mapped " "$OS_PROBER_TMP/mounted-map" | head -n1 | cut -d " " -f 2) - mpoint="$(unescape_mount "$mpoint")" - if [ "$mpoint" = "/target/boot" ] || [ "$mpoint" = "/target" ] || [ "$mpoint" = "/" ]; then - continue - fi uuid=$(blkid -o value -s UUID $mapped) if grep -q "^$uuid" "$OS_PROBER_TMP/btrfs-vols" ; then + debug "skipped btrfs partition=$partition uuid=$uuid" continue fi debug "btrfs volume uuid=$uuid partition=$partition"
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor