... when /lib* directories are moved to /usr/ completely.
Closes: #698733
Cowgill; closes: #776275).
* Make os-prober depend on grub-common on Linux and kFreeBSD, in order
that grub-mount is consistently available.
+ * Fix detection of /usr/ partition as a GNU/Linux root partition when
+ /lib* directories are moved to /usr/ completely (thanks, Hedayat
+ Vatankhah; closes: #698733).
-- Colin Watson <cjwatson@debian.org> Sat, 31 Dec 2016 17:11:49 +0000
# 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 (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || 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")")"