Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Factory:Rebuild
os-prober
os-prober-linux-distro-parse-os-release.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File os-prober-linux-distro-parse-os-release.patch of Package os-prober
--- os-probes/mounted/common/90linux-distro | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) --- a/os-probes/mounted/common/90linux-distro +++ b/os-probes/mounted/common/90linux-distro @@ -10,7 +10,18 @@ uuid="$4" subvol="$5" -if [ -e "$dir/etc/os-release" ]; then +if [ -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="$(grep ^NAME= "$RELPATH" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g; s/[[:space:]].*//')" + long="$(grep ^PRETTY_NAME= "$RELPATH" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g')" + else + exit 1 + fi +elif [ -e "$dir/etc/os-release" ]; then short="$(grep ^NAME= "$dir/etc/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g; s/[[:space:]].*//')" long="$(grep ^PRETTY_NAME= "$dir/etc/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g')" elif [ -e "$dir/usr/lib/os-release" ]; then
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