ec03b6538c
- The wildcard test for ld.so is inaccurate, slow and sometimes hangs a long time with grub2-mount. Disable it becuase it does quite opposite it was intended to do, that is having an inital quick filter for non linux partition to speed things up. (bsc#1008444) * modified os-prober-linux-distro-avoid-expensive-ld-file-test.patch * refresh os-prober-linux-distro-parse-os-release.patch OBS-URL: https://build.opensuse.org/request/show/440345 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=71
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
Index: os-prober-1.70/os-probes/mounted/common/90linux-distro
|
|
===================================================================
|
|
--- os-prober-1.70.orig/os-probes/mounted/common/90linux-distro
|
|
+++ os-prober-1.70/os-probes/mounted/common/90linux-distro
|
|
@@ -117,6 +117,20 @@ elif [ -e "$dir/etc/lfs-release" ]; then
|
|
elif [ -e "$dir/etc/meego-release" ]; then
|
|
short="MeeGo"
|
|
long="$(head -1 "$dir/etc/meego-release")"
|
|
+elif [ -L "$dir/etc/os-release" ]; then
|
|
+ RELPATH=$(readlink -f "$dir/etc/os-release")
|
|
+ if readlink "$dir/etc/os-release" | grep -q '^/'; then
|
|
+ RELPATH="$dir$RELPATH"
|
|
+ fi
|
|
+ if [ -f "$RELPATH" ]; then
|
|
+ short=$(sed -n "/^NAME=/{s@\"\(.*\)\"@\1@;t 1;s@'\(.*\)'@\1@;: 1;s@^[^=]\+=@@;p;b}" "$RELPATH")
|
|
+ long="$short $(sed -n "/^VERSION=/{s@\"\(.*\)\"@\1@;t 1;s@'\(.*\)'@\1@;: 1;s@^[^=]\+=@@;p;b}" "$RELPATH")"
|
|
+ else
|
|
+ exit 1
|
|
+ fi
|
|
+elif [ -e "$dir/etc/os-release" ]; then
|
|
+ short=$(sed -n "/^NAME=/{s@\"\(.*\)\"@\1@;t 1;s@'\(.*\)'@\1@;: 1;s@^[^=]\+=@@;p;b}" $dir/etc/os-release)
|
|
+ long="$short $(sed -n "/^VERSION=/{s@\"\(.*\)\"@\1@;t 1;s@'\(.*\)'@\1@;: 1;s@^[^=]\+=@@;p;b}" $dir/etc/os-release)"
|
|
else
|
|
exit 1
|
|
fi
|