~ilya-yanok/ubuntu/precise/grub2/fix-for-948716

« back to all changes in this revision

Viewing changes to util/grub.d/30_os-prober.in

  • Committer: Bazaar Package Importer
  • Author(s): Robert Millan
  • Date: 2009-07-25 19:00:53 UTC
  • mfrom: (1.6.3 upstream)
  • mto: (17.4.13 sid)
  • mto: This revision was merged to the branch mainline in revision 53.
  • Revision ID: james.westby@ubuntu.com-20090725190053-uv3lm6ya3zxs77ep
ImportĀ upstreamĀ versionĀ 1.96+20090725

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
. ${libdir}/grub/grub-mkconfig_lib
24
24
 
25
 
if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
26
 
  exit 0
27
 
fi
28
 
 
29
25
if [ -z "`which os-prober 2> /dev/null`" -o -z "`which linux-boot-prober 2> /dev/null`" ] ; then
30
26
  # missing os-prober and/or linux-boot-prober
31
27
  exit 0
32
28
fi
33
29
 
34
 
OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
 
30
OSPROBED="`os-prober 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
35
31
if [ -z "${OSPROBED}" ] ; then
36
32
  # empty os-prober output, nothing doing
37
33
  exit 0
57
53
EOF
58
54
      prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
59
55
 
60
 
      case ${LONGNAME} in
61
 
        Windows\ Vista*|Windows\ 7*)
62
 
        ;;
63
 
        *)
64
 
          cat << EOF
 
56
      if [ "${LONGNAME}" != "Windows Vista (loader)" ] ; then
 
57
        cat << EOF
65
58
        drivemap -s (hd0) \${root}
66
59
EOF
67
 
        ;;
68
 
      esac
69
 
 
 
60
      fi
70
61
      cat <<EOF
71
62
        chainloader +1
72
63
}