2023-01-03 03:35:40 +01:00
|
|
|
---
|
|
|
|
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 @@
|
2017-02-20 12:06:06 +01:00
|
|
|
uuid="$4"
|
|
|
|
subvol="$5"
|
|
|
|
|
|
|
|
-if [ -e "$dir/etc/os-release" ]; then
|
|
|
|
+if [ -L "$dir/etc/os-release" ]; then
|
2016-10-04 13:56:26 +02:00
|
|
|
+ RELPATH=$(readlink -f "$dir/etc/os-release")
|
|
|
|
+ if readlink "$dir/etc/os-release" | grep -q '^/'; then
|
|
|
|
+ RELPATH="$dir$RELPATH"
|
|
|
|
+ fi
|
|
|
|
+ if [ -f "$RELPATH" ]; then
|
2017-02-20 12:06:06 +01:00
|
|
|
+ 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')"
|
2016-10-04 13:56:26 +02:00
|
|
|
+ else
|
|
|
|
+ exit 1
|
|
|
|
+ fi
|
2016-09-20 14:58:34 +02:00
|
|
|
+elif [ -e "$dir/etc/os-release" ]; then
|
2017-02-20 12:06:06 +01:00
|
|
|
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')"
|
2023-01-03 03:35:40 +01:00
|
|
|
elif [ -e "$dir/usr/lib/os-release" ]; then
|