X-Debbugs-CC: debian-h...@lists.debian.org
---
 os-prober | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/os-prober b/os-prober
index d67f0b3..6a73a42 100755
--- a/os-prober
+++ b/os-prober
@@ -48,13 +48,22 @@ partitions () {
                                done
                        done
                fi
-       elif [ "$(uname -s)" = Linux ]; then
-               echo "Cannot find list of partitions!  (Try mounting /sys.)" >&2
-               exit 1
        else
-               # We don't know how to probe OSes on non-Linux kernels.  For
-               # now, just don't get in the way.
-               exit 0
+               os_name="$(uname -s)"
+               if [ "$os_name" = GNU ]; then
+                       for part in /dev/hd*s*[0-9] /dev/sd*s*[0-9]; do
+                               if [ -s "$part" ]; then
+                                       echo "$part"
+                               fi
+                       done
+               elif [ "$os_name" = Linux ]; then
+                       echo "Cannot find list of partitions!  (Try mounting 
/sys.)" >&2
+                       exit 1
+               else
+                       # We don't know how to probe OSes on non-Linux and 
non-GNU kernels.
+                       # For now, just don't get in the way.
+                       exit 0
+               fi
        fi
 
        # Also detect OSes on LVM volumes (assumes LVM is active)
-- 
2.5.1

Reply via email to