Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
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
Index: os-prober-1.61/os-probes/mounted/common/90linux-distro =================================================================== --- os-prober-1.61.orig/os-probes/mounted/common/90linux-distro +++ os-prober-1.61/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
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