Magellan Linux

Diff of /tags/grubby-8_40_20170706/new-kernel-pkg

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2993 by niro, Thu Jun 30 10:35:55 2016 UTC revision 3045 by niro, Thu Jul 6 12:17:30 2017 UTC
# Line 186  rungrubby() Line 186  rungrubby()
186   declare -x debugargs="${DEBUGARG}"   declare -x debugargs="${DEBUGARG}"
187   shift   shift
188   else   else
189   [[ -n ${verbose} ] && echo "- Making a normal entry."   [[ -n ${verbose} ]] && echo "- Making a normal entry."
190   fi   fi
191   $(eval $grubby $@)   $(eval $grubby $@)
192   export -n debugargs   export -n debugargs
# Line 295  install() Line 295  install()
295   --title=\"${title}\${debugtitle}\" --copy-default \   --title=\"${title}\${debugtitle}\" --copy-default \
296   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \
297   --remove-kernel=\"TITLE=${title}\${debugtitle}\""   --remove-kernel=\"TITLE=${title}\${debugtitle}\""
  rungrubby --debug ${ARGS}  
298   rungrubby ${ARGS} ${makedefault}   rungrubby ${ARGS} ${makedefault}
299     rungrubby --debug ${ARGS} --set-index=1
300   else   else
301   [[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby for grub 0.97"   [[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby for grub 0.97"
302   fi   fi
# Line 310  install() Line 310  install()
310   ${mbargs:+--mbargs=\"${mbargs}\"} \   ${mbargs:+--mbargs=\"${mbargs}\"} \
311   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \
312   --remove-kernel=\"TITLE=${title}\${debugtitle}\""   --remove-kernel=\"TITLE=${title}\${debugtitle}\""
  rungrubby --debug ${ARGS}  
313   rungrubby ${ARGS} ${makedefault}   rungrubby ${ARGS} ${makedefault}
314     rungrubby --debug ${ARGS} --set-index=1
315   else   else
316   [[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby for grub 2"   [[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby for grub 2"
317   fi   fi
# Line 326  install() Line 326  install()
326   ${mbargs:+--mbargs=\"${mbargs}\"} \   ${mbargs:+--mbargs=\"${mbargs}\"} \
327   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \
328   --remove-kernel=\"TITLE=${title}\${debugtitle}\""   --remove-kernel=\"TITLE=${title}\${debugtitle}\""
  rungrubby --debug ${ARGS}  
329   rungrubby ${ARGS} ${makedefault}   rungrubby ${ARGS} ${makedefault}
330     rungrubby --debug ${ARGS} --set-index=1
331   else   else
332   [[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby for grub 2 with UEFI"   [[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby for grub 2 with UEFI"
333   fi   fi
# Line 342  install() Line 342  install()
342   ${mbargs:+--mbargs=\"${mbargs}\"} \   ${mbargs:+--mbargs=\"${mbargs}\"} \
343   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \
344   --remove-kernel=\"TITLE=${version}\""   --remove-kernel=\"TITLE=${version}\""
  rungrubby --debug ${ARGS}  
345   rungrubby ${ARGS} ${makedefault}   rungrubby ${ARGS} ${makedefault}
346     rungrubby --debug ${ARGS} --set-index=1
347    
348   if [[ -n ${runLilo} ]]   if [[ -n ${runLilo} ]]
349   then   then
# Line 370  install() Line 370  install()
370   ${mbargs:+--mbargs=\"${mbargs}\"} \   ${mbargs:+--mbargs=\"${mbargs}\"} \
371   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \   --args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \
372   --remove-kernel=\"TITLE=${title}\${debugtitle}\""   --remove-kernel=\"TITLE=${title}\${debugtitle}\""
  rungrubby --debug ${ARGS}  
373   rungrubby ${ARGS} ${makedefault}   rungrubby ${ARGS} ${makedefault}
374     rungrubby --debug ${ARGS} --set-index=1
375   else   else
376   [[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby for extlinux"   [[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby for extlinux"
377   fi   fi
# Line 540  update() Line 540  update()
540   ${removeargs:+--remove-args=\"${removeargs}\"} \   ${removeargs:+--remove-args=\"${removeargs}\"} \
541   ${mbkernel:+--add-multiboot=\"${mbkernel}\"} \   ${mbkernel:+--add-multiboot=\"${mbkernel}\"} \
542   --title=\"${title}\${debugtitle}\""   --title=\"${title}\${debugtitle}\""
  rungrubby --debug ${ARGS}  
543   rungrubby ${ARGS}   rungrubby ${ARGS}
544     rungrubby --debug ${ARGS}
545   else   else
546   [[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby"   [[ -n ${verbose} ]] && echo "${grubConfig} does not exist, not running grubby"
547   fi   fi
# Line 553  update() Line 553  update()
553   ${kernargs:+--args=\"${kernargs}\"} \   ${kernargs:+--args=\"${kernargs}\"} \
554   ${removeargs:+--remove-args=\"${removeargs}\"} \   ${removeargs:+--remove-args=\"${removeargs}\"} \
555   --title=\"${title}\${debugtitle}\""   --title=\"${title}\${debugtitle}\""
  rungrubby --debug ${ARGS}  
556   rungrubby ${ARGS}   rungrubby ${ARGS}
557     rungrubby --debug ${ARGS}
558   else   else
559   [[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby"   [[ -n ${verbose} ]] && echo "${grub2Config} does not exist, not running grubby"
560   fi   fi
# Line 566  update() Line 566  update()
566   ${INITRD} ${kernargs:+--args=\"${kernargs}\"} \   ${INITRD} ${kernargs:+--args=\"${kernargs}\"} \
567   ${removeargs:+--remove-args=\"${removeargs}\"} \   ${removeargs:+--remove-args=\"${removeargs}\"} \
568   --title=\"${title}\${debugtitle}\""   --title=\"${title}\${debugtitle}\""
  rungrubby --debug ${ARGS}  
569   rungrubby ${ARGS}   rungrubby ${ARGS}
570     rungrubby --debug ${ARGS}
571   else   else
572   [[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby"   [[ -n ${verbose} ]] && echo "${grub2EfiConfig} does not exist, not running grubby"
573   fi   fi
# Line 579  update() Line 579  update()
579   ${kernargs:+--args=\"${kernargs}\"} \   ${kernargs:+--args=\"${kernargs}\"} \
580   ${removeargs:+--remove-args=\"${removeargs}\"} \   ${removeargs:+--remove-args=\"${removeargs}\"} \
581   --title=\"${title}\${debugtitle}\""   --title=\"${title}\${debugtitle}\""
  rungrubby --debug ${ARGS}  
582   rungrubby ${ARGS}   rungrubby ${ARGS}
583     rungrubby --debug ${ARGS}
584    
585   if [[ -n ${runLilo} ]]   if [[ -n ${runLilo} ]]
586   then   then
# Line 637  update() Line 637  update()
637   ${DEVTREE} ${DEVTREEDIR} ${INITRD} ${kernargs:+--args=\"${kernargs}\"} \   ${DEVTREE} ${DEVTREEDIR} ${INITRD} ${kernargs:+--args=\"${kernargs}\"} \
638   ${removeargs:+--remove-args=\"${removeargs}\"} \   ${removeargs:+--remove-args=\"${removeargs}\"} \
639   --title=\"${title}\${debugtitle}\""   --title=\"${title}\${debugtitle}\""
  rungrubby --debug ${ARGS}  
640   rungrubby ${ARGS}   rungrubby ${ARGS}
641     rungrubby --debug ${ARGS}
642   else   else
643   [[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby"   [[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby"
644   fi   fi
# Line 924  then Line 924  then
924  fi  fi
925  [[ -n ${verbose} ]] && echo "devtreedir is ${devtreedir}"  [[ -n ${verbose} ]] && echo "devtreedir is ${devtreedir}"
926    
927  # add dracut i18n, keyboard and plymouth kernel args if requested  # add dracut kernel args if requested
928  if [[ -n ${dracut} ]] || [[ -n ${adddracutargs} ]]  if [[ -n ${dracut} ]] && [[ -n ${adddracutargs} ]]
929  then  then
930   if [ -r /etc/vconsole.conf ]   [ -r /etc/vconsole.conf ] && . /etc/vconsole.conf
931   then   [ -r /etc/locale.conf ] && . /etc/locale.conf
  . /etc/vconsole.conf  
   
  for i in SYSFONT SYSFONTACM UNIMAP KEYTABLE  
  do  
  val=$(eval echo \$$i)  
  [[ -n ${val} ]] && kernargs="${kernargs} ${i}=${val}"  
  done  
  else  
  if [ -r /etc/conf.d/consolefont ]  
  then  
  . /etc/conf.d/consolefont  
932    
933   if [[ -n ${CONSOLEFONT} ]]   while read opt rd_opt
934   then   do
935   kernargs="${kernargs} SYSFONT=${CONSOLEFONT}"   [ -n "${!opt}" ] && kernargs="$kernargs $rd_opt=\"${!opt}\""
936   fi   done <<< 'KEYMAP rd.vconsole.keymap
937   fi   FONT rd.vconsole.font
938     FONT_MAP rd.vconsole.font.map
939   if  [ -r /etc/conf.d/keymap ]   FONT_UNIMAP rd.vconsole.font.unimap
940   then   UNICODE rd.vconsole.font.unicode
941   . /etc/conf.d/keymap   EXT_KEYMAP rd.vconsole.keymap.ext
942     LANG rd.locale.LANG
943   if [[ -n ${KEYMAP} ]]   LC_ALL rd.locale.LC_ALL'
  then  
  kernargs="${kernargs} KEYTABLE=${KEYMAP}"  
  fi  
  fi  
  fi  
   
  if [ -r /etc/locale.conf ]  
  then  
  . /etc/locale.conf  
   
  if [[ -n ${LANG} ]]  
  then  
  kernargs="${kernargs} LANG=${LANG}"  
  fi  
  fi  
944  fi  fi
945    
946  # set this as the default if we have the package and it matches  # set this as the default if we have the package and it matches
# Line 1061  fi Line 1035  fi
1035  # if we mounted the U-Boot directory, unmount it.  # if we mounted the U-Boot directory, unmount it.
1036  [[ -n ${mounted} ]] && umount ${ubootDir}  [[ -n ${mounted} ]] && umount ${ubootDir}
1037    
1038    # make sure changes make it to the disk.
1039    # if /boot is a mountpoint, force the meta data on disk
1040    # to by-pass writeback delay.
1041    # PPC64LE-only to deal with Petitboot issues
1042    if [[ ${ARCH} = ppc64le ]]
1043    then
1044     sync && mountpoint -q /boot && fsfreeze -f /boot && fsfreeze -u /boot
1045    fi
1046    
1047  exit 0  exit 0

Legend:
Removed from v.2993  
changed lines
  Added in v.3045