~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to util/grub-mkconfig_lib.in

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-02-08 11:39:26 UTC
  • mfrom: (17.6.26 experimental)
  • mto: (17.6.27 experimental)
  • mto: This revision was merged to the branch mainline in revision 104.
  • Revision ID: james.westby@ubuntu.com-20110208113926-clfs90haboyk9zip
Tags: 1.99~rc1-2
* Merge 1.98+20100804-13 and 1.98+20100804-14, updating translations:
  - Kazakh (Baurzhan Muftakhidinov / Timur Birsh).
* mkconfig_skip_dmcrypt.patch: Refer to GRUB_PRELOAD_MODULES rather than
  suggesting people write a /etc/grub.d/01_modules script (thanks, Jordan
  Uggla).
* Handle empty dir passed to grub_find_root_device_from_mountinfo; fixes
  grub-mkrelpath on btrfs subvolumes (LP: #712029).
* Add rootflags=subvol=<name> if / is on a btrfs subvolume (LP: #712029).
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
 
108
108
  partmap="`${grub_probe} --device ${device} --target=partmap`"
109
109
  for module in ${partmap} ; do
110
 
    echo "insmod part_${module}"
 
110
    case "${module}" in
 
111
      netbsd | openbsd)
 
112
        echo "insmod part_bsd";;
 
113
      *)
 
114
        echo "insmod part_${module}";;
 
115
    esac
111
116
  done
112
117
 
113
118
  fs="`${grub_probe} --device ${device} --target=fs`"
119
124
  # otherwise set root as per value in device.map.
120
125
  echo "set root='`${grub_probe} --device ${device} --target=drive`'"
121
126
  if fs_uuid="`${grub_probe} --device ${device} --target=fs_uuid 2> /dev/null`" ; then
122
 
    echo "search --no-floppy --fs-uuid --set ${fs_uuid}"
 
127
    echo "search --no-floppy --fs-uuid --set=root ${fs_uuid}"
123
128
  fi
124
129
}
125
130
 
187
192
  echo "$a"
188
193
}
189
194
 
 
195
# One layer of quotation is eaten by "", the second by sed, and the third by
 
196
# printf; so this turns ' into \'.  Note that you must use the output of
 
197
# this function in a printf format string.
190
198
gettext_quoted () {
191
 
  $gettext "$@" | sed "s/'/'\\\\''/g"
 
199
  $gettext "$@" | sed "s/'/'\\\\\\\\''/g"
 
200
}
 
201
 
 
202
# Run the first argument through gettext_quoted, and then pass that and all
 
203
# remaining arguments to printf.  This is a useful abbreviation and tends to
 
204
# be easier to type.
 
205
gettext_printf () {
 
206
  local format="$1"
 
207
  shift
 
208
  printf "$(gettext_quoted "$format")" "$@"
192
209
}
193
210
 
194
211
uses_abstraction () {