Magellan Linux

Diff of /trunk/grubby/new-kernel-pkg

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

revision 1710 by niro, Sat Feb 18 00:28:45 2012 UTC revision 1716 by niro, Sat Feb 18 00:46:32 2012 UTC
# Line 46  cfgGrub2="" Line 46  cfgGrub2=""
46  cfgGrub2Efi=""  cfgGrub2Efi=""
47  cfgGrub=""  cfgGrub=""
48  cfgLilo=""  cfgLilo=""
49    cfgExtlinux=""
50  cfguBoot=""  cfguBoot=""
51  runLilo=""  runLilo=""
52  grubConfig=""  grubConfig=""
53  grub2Config=""  grub2Config=""
54  grub2EfiConfig=""  grub2EfiConfig=""
55    extlinuxConfig=""
56    
57  ARCH=$(uname -m)  ARCH=$(uname -m)
58    
# Line 102  else Line 104  else
104   grubConfig=/boot/grub/grub.conf   grubConfig=/boot/grub/grub.conf
105   grub2Config=/boot/grub/grub.cfg   grub2Config=/boot/grub/grub.cfg
106   grub2EfiConfig=/boot/grub/grub-efi.cfg   grub2EfiConfig=/boot/grub/grub-efi.cfg
107     extlinuxConfig=/boot/extlinux/extlinux.conf
108   bootPrefix=/boot   bootPrefix=/boot
109   liloFlag=lilo   liloFlag=lilo
110   isx86="yes"   isx86="yes"
# Line 271  install() Line 274  install()
274   else   else
275   [[ -n ${verbose} ]] && echo "${liloConfig} does not exist, not running grubby"   [[ -n ${verbose} ]] && echo "${liloConfig} does not exist, not running grubby"
276   fi   fi
277    
278     if [[ -n ${cfgExtlinux} ]]
279     then
280     [[ -n ${verbose} ]] && echo "adding ${version} to ${extlinuxConfig}"
281    
282     if [[ -n ${banner} ]]
283     then
284     title="${banner} (${version})"
285     elif [ -f /etc/mageversion ]
286     then
287     title="Magellan Linux $(< /etc/mageversion) (${version})"
288     else
289     title="Magellan Linux (${version})"
290     fi
291     ${grubby} --extlinux -c ${extlinuxConfig} \
292     --add-kernel=${bootPrefix}/${kernelName}-${version} \
293     ${INITRD} --copy-default ${makedefault} --title "${title}" \
294     ${mbkernel:+--add-multiboot="${mbkernel}"} ${mbargs:+--mbargs="${mbargs}"} \
295     --args="root=${rootdevice} ${kernargs}" --remove-kernel="TITLE=${title}"
296     else
297     [[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby for extlinux"
298     fi
299  }  }
300    
301  remove()  remove()
# Line 380  remove() Line 405  remove()
405   else   else
406   [[ -n ${verbose} ]] && echo "${ubootScript} does not exist, not modifying ${ubootDir}"   [[ -n ${verbose} ]] && echo "${ubootScript} does not exist, not modifying ${ubootDir}"
407   fi   fi
408    
409     if [[ -n ${cfgExtlinux} ]]
410     then
411     [[ -n ${verbose} ]] && echo "removing ${version} from ${extlinuxConfig}"
412     ${grubby} --extlinux -c ${extlinuxConfig} \
413     --remove-kernel=${bootPrefix}/${kernelName}-${version}
414     else
415     [[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby for extlinux"
416     fi
417  }  }
418    
419  update()  update()
# Line 492  update() Line 526  update()
526   else   else
527   [[ -n ${verbose} ]] && echo "${ubootScript} does not exist, not setting up ${ubootDir}"   [[ -n ${verbose} ]] && echo "${ubootScript} does not exist, not setting up ${ubootDir}"
528   fi   fi
529    
530     if [[ -n ${cfgExtlinux} ]]
531     then
532     [[ -n ${verbose} ]] && echo "updating ${version} from ${extlinuxConfig}"
533     ${grubby} --extlinux -c ${extlinuxConfig} \
534     --update-kernel=${bootPrefix}/${kernelName}-${version} \
535     ${INITRD} \
536     ${kernargs:+--args="${kernargs}"} \
537     ${removeargs:+--remove-args="${removeargs}"}
538     else
539     [[ -n ${verbose} ]] && echo "${extlinuxConfig} does not exist, not running grubby"
540     fi
541  }  }
542    
543  mkinitrd()  mkinitrd()
# Line 757  fi Line 803  fi
803  [[ -n ${grub2Config} ]] && [ -f ${grub2Config} ] && cfgGrub2=1  [[ -n ${grub2Config} ]] && [ -f ${grub2Config} ] && cfgGrub2=1
804  [[ -n ${grub2EfiConfig} ]] && [ -f ${grub2EfiConfig} ] && cfgGrub2Efi=1  [[ -n ${grub2EfiConfig} ]] && [ -f ${grub2EfiConfig} ] && cfgGrub2Efi=1
805  [[ -n ${liloConfig} ]] && [ -f ${liloConfig} ] && cfgLilo=1  [[ -n ${liloConfig} ]] && [ -f ${liloConfig} ] && cfgLilo=1
806    [[ -n ${extlinuxConfig} ]] && [ -f ${extlinuxConfig} ] && cfgExtlinux=1
807    
808  # if we have a uBoot directory, check if it is mounted.  # if we have a uBoot directory, check if it is mounted.
809  # if not, mount it. Then check if a boot script exists.  # if not, mount it. Then check if a boot script exists.

Legend:
Removed from v.1710  
changed lines
  Added in v.1716