dea69a97c7
- Fix umount error when directory is temporarily busy (bug #903906)
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
Index: os-prober-1.58/os-probes/mounted/common/90linux-distro
|
|
===================================================================
|
|
--- os-prober-1.58.orig/os-probes/mounted/common/90linux-distro
|
|
+++ os-prober-1.58/os-probes/mounted/common/90linux-distro
|
|
@@ -17,7 +17,7 @@ type="$3"
|
|
# symlinks we need to also check in $dir/usr/lib* for distributions that
|
|
# moved /lib* to /usr and only left symlinks behind.
|
|
# TODO: look for ld-linux.so on arches that have it
|
|
-if (ls "$dir"/lib*/ld*.so* || ls "$dir"/usr/lib*/ld*.so*) >/dev/null 2>/dev/null; then
|
|
+if [ -L "$dir"/lib ] || (ls "$dir"/lib*/ld*.so* || ls "$dir"/usr/lib*/ld*.so*) >/dev/null 2>/dev/null; then
|
|
if [ -e "$dir/etc/debian_version" ]; then
|
|
short="Debian"
|
|
long="$(printf "Debian GNU/Linux (%s)\n" "$(cat "$dir/etc/debian_version")")"
|
|
@@ -125,9 +125,13 @@ if (ls "$dir"/lib*/ld*.so* || ls "$dir"/
|
|
elif [ -e "$dir/etc/meego-release" ]; then
|
|
short="MeeGo"
|
|
long="$(head -1 "$dir/etc/meego-release")"
|
|
- else
|
|
+ elif (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || ls "$dir"/usr/lib*/ld*.so*) >/dev/null 2>/dev/null; then
|
|
+ # Don't report 'Linux distribution' if only a /lib symlink is found or if this is
|
|
+ # a partition without /boot (should be /usr partition)
|
|
short="Linux"
|
|
long="unknown Linux distribution"
|
|
+ else
|
|
+ exit 1
|
|
fi
|
|
|
|
label="$(count_next_label "$short")"
|