Ignore:
Timestamp:
03/04/14 07:18:12 (14 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
cdd74e2
Parents:
713c464
Message:

Update grub overlay data to match current 2.02 pre-release version we just pushed to
ports tree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-extractoverlay/ports-overlay/usr/local/share/grub/grub-mkconfig_lib

    rc297e38 r0fbe5d0  
    1515# along with GRUB.  If not, see <http://www.gnu.org/licenses/>. 
    1616 
    17 transform="s,x,x," 
    18  
    1917prefix="/usr/local" 
    20 exec_prefix="${prefix}" 
    21 datarootdir="${prefix}/share" 
     18exec_prefix="/usr/local" 
     19datarootdir="/usr/local/share" 
    2220datadir="${datarootdir}" 
    2321bindir="${exec_prefix}/bin" 
    2422sbindir="${exec_prefix}/sbin" 
    25 pkgdatadir="${datadir}/grub" 
     23if [ "x$pkgdatadir" = x ]; then 
     24    pkgdatadir="${datadir}/grub" 
     25fi 
    2626 
    2727if test "x$grub_probe" = x; then 
    28   grub_probe="${sbindir}/`echo grub-probe | sed "${transform}"`" 
     28  grub_probe="${sbindir}/grub-probe" 
     29fi 
     30if test "x$grub_file" = x; then 
     31  grub_file="${bindir}/grub-file" 
    2932fi 
    3033if test "x$grub_mkrelpath" = x; then 
    31   grub_mkrelpath="${bindir}/`echo grub-mkrelpath | sed "${transform}"`" 
     34  grub_mkrelpath="${bindir}/grub-mkrelpath" 
    3235fi 
    3336 
     
    6669  # ... or if we can't figure out the abstraction module, for example if 
    6770  # memberlist fails on an LVM volume group. 
    68   if abstractions="`"${grub_probe}" -t abstraction "$path"`" 2>&1 ; then  
     71  if abstractions="`"${grub_probe}" -t abstraction "$path"`" 2> /dev/null ; then  
    6972      : 
    7073  else 
     
    7275  fi 
    7376 
    74   if [ x$GRUB_CRYPTODISK_ENABLE = xy ]; then 
     77  if [ x$GRUB_ENABLE_CRYPTODISK = xy ]; then 
    7578      return 0 
    7679  fi 
     
    118121prepare_grub_to_access_device () 
    119122{ 
    120   device="$1" 
    121  
    122   partmap="`"${grub_probe}" --device "${device}" --target=partmap`" 
     123  old_ifs="$IFS" 
     124  IFS=' 
     125' 
     126  partmap="`"${grub_probe}" --device $@ --target=partmap`" 
    123127  for module in ${partmap} ; do 
    124128    case "${module}" in 
     
    131135 
    132136  # Abstraction modules aren't auto-loaded. 
    133   abstraction="`"${grub_probe}" --device "${device}" --target=abstraction`" 
     137  abstraction="`"${grub_probe}" --device $@ --target=abstraction`" 
    134138  for module in ${abstraction} ; do 
    135139    echo "insmod ${module}" 
    136140  done 
    137    
     141 
    138142  # KPM - 6-24-2013 
    139143  # Add this work-around since GRUB doesn't like to identify ZFS 
     
    144148     fs="zfs" 
    145149  else 
    146     fs="`"${grub_probe}" --device "${device}" --target=fs`" 
    147   fi 
     150     fs="`"${grub_probe}" --device $@ --target=fs`" 
     151  fi 
     152 
    148153  for module in ${fs} ; do 
    149154    echo "insmod ${module}" 
    150155  done 
    151156 
    152   if [ x$GRUB_CRYPTODISK_ENABLE = xy ]; then 
    153       for uuid in "`"${grub_probe}" --device "${device}" --target=cryptodisk_uuid`"; do 
     157  if [ x$GRUB_ENABLE_CRYPTODISK = xy ]; then 
     158      for uuid in "`"${grub_probe}" --device $@ --target=cryptodisk_uuid`"; do 
    154159          echo "cryptomount -u $uuid" 
    155160      done 
     
    158163  # If there's a filesystem UUID that GRUB is capable of identifying, use it; 
    159164  # otherwise set root as per value in device.map. 
    160   fs_hint="`"${grub_probe}" --device "${device}" --target=compatibility_hint`" 
     165  fs_hint="`"${grub_probe}" --device $@ --target=compatibility_hint`" 
    161166  if [ "x$fs_hint" != x ]; then 
    162167    echo "set root='$fs_hint'" 
    163168  fi 
    164   if fs_uuid="`"${grub_probe}" --device "${device}" --target=fs_uuid 2> /dev/null`" ; then 
    165     hints="`"${grub_probe}" --device "${device}" --target=hints_string 2> /dev/null`" || hints= 
     169  if fs_uuid="`"${grub_probe}" --device $@ --target=fs_uuid 2> /dev/null`" ; then 
     170    hints="`"${grub_probe}" --device $@ --target=hints_string 2> /dev/null`" || hints= 
    166171    echo "if [ x\$feature_platform_search_hint = xy ]; then" 
    167172    echo "  search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}" 
     
    170175    echo "fi" 
    171176  fi 
     177  IFS="$old_ifs" 
    172178} 
    173179 
    174180grub_get_device_id () 
    175181{ 
     182  old_ifs="$IFS" 
     183  IFS=' 
     184' 
    176185  device="$1" 
    177   if fs_uuid="`"${grub_probe}" --device "${device}" --target=fs_uuid 2> /dev/null`" ; then 
     186  if fs_uuid="`"${grub_probe}" --device ${device} --target=fs_uuid 2> /dev/null`" ; then 
    178187    echo "$fs_uuid"; 
    179188  else 
    180     echo "$device" 
    181   fi 
     189    echo $device |sed 's, ,_,g' 
     190  fi 
     191  IFS="$old_ifs" 
    182192} 
    183193 
     
    265275} 
    266276 
    267 # One layer of quotation is eaten by "", the second by sed, and the third by 
    268 # printf; so this turns ' into \'.  Note that you must use the output of 
    269 # this function in a printf format string. 
    270  
     277# One layer of quotation is eaten by "" and the second by sed; so this turns 
     278# ' into \'. 
    271279grub_quote () { 
    272   sed "s/'/'\\\\\\\\''/g" 
     280  sed "s/'/'\\\\''/g" 
    273281} 
    274282 
    275283gettext_quoted () { 
    276   gettext "$@" | sed "s/'/'\\\\\\\\''/g" 
    277 } 
    278  
    279 # Run the first argument through gettext_quoted, and then pass that and all 
     284  gettext "$@" | grub_quote 
     285} 
     286 
     287# Run the first argument through gettext, and then pass that and all 
    280288# remaining arguments to printf.  This is a useful abbreviation and tends to 
    281289# be easier to type. 
     
    288296uses_abstraction () { 
    289297  device="$1" 
    290  
    291   abstraction="`"${grub_probe}" --device "${device}" --target=abstraction`" 
     298  old_ifs="$IFS" 
     299  IFS=' 
     300' 
     301 
     302  abstraction="`"${grub_probe}" --device ${device} --target=abstraction`" 
    292303  for module in ${abstraction}; do 
    293304    if test "x${module}" = "x$2"; then 
     305      IFS="$old_ifs" 
    294306      return 0 
    295307    fi 
    296308  done 
     309  IFS="$old_ifs" 
    297310  return 1 
    298311} 
     
    359372  fi 
    360373} 
     374 
     375grub_tab="      " 
     376 
     377grub_add_tab () { 
     378  sed -e "s/^/$grub_tab/" 
     379} 
     380 
Note: See TracChangeset for help on using the changeset viewer.