2016-09-20 14:58:34 +02:00
|
|
|
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
|
2016-10-04 13:56:26 +02:00
|
|
|
@@ -117,6 +117,20 @@ elif [ -e "$dir/etc/lfs-release" ]; then
|
2016-09-20 14:58:34 +02:00
|
|
|
elif [ -e "$dir/etc/meego-release" ]; then
|
|
|
|
short="MeeGo"
|
|
|
|
long="$(head -1 "$dir/etc/meego-release")"
|
2016-10-04 13:56:26 +02:00
|
|
|
+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
|
2016-09-20 14:58:34 +02:00
|
|
|
+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)"
|
2016-11-15 10:53:30 +01:00
|
|
|
else
|
|
|
|
exit 1
|
|
|
|
fi
|