The available_ids() as a patch against grub-pc 1.98-1ubuntu6

$ diff -u /var/lib/dpkg/info/grub-pc.postinst .
--- /var/lib/dpkg/info/grub-pc.postinst 2010-04-29 04:24:48.000000000 -0400
+++ ./grub-pc.postinst  2010-05-05 15:43:27.491704375 -0400
@@ -19,16 +19,18 @@
 cached_available_ids=
 available_ids()
 {
-  local id path
+  local id path diskby
 
   if [ "$cached_available_ids" ]; then
     echo "$cached_available_ids"
     return
   fi
 
-  [ -d /dev/disk/by-id ] || return
+  for diskby in /dev/disk/by-id /dev/disk/by-uuid; do
+    [ -d "$diskby" ] && break
+  done
   cached_available_ids="$(
-    for path in /dev/disk/by-id/*; do
+    for path in "$diskby"/* ; do
       [ -e "$path" ] || continue
       printf '%s %s\n' "$path" "$(readlink -f "$path")"
     done | sort -k2 -s -u | cut -d' ' -f1

-- 
Lucid Alpha 2 server iso install fails at bootloader in KVM
https://bugs.launchpad.net/bugs/524434
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to