165 |
echo " [--banner=<banner>] [--multiboot=multiboot]" >&2 |
echo " [--banner=<banner>] [--multiboot=multiboot]" >&2 |
166 |
echo " [--mbargs=mbargs] [--make-default] [--add-dracut-args]" >&2 |
echo " [--mbargs=mbargs] [--make-default] [--add-dracut-args]" >&2 |
167 |
echo " [--add-plymouth-initrd]" >&2 |
echo " [--add-plymouth-initrd]" >&2 |
168 |
echo " [--host-only] [--devtree=<devicetree.dtb>]" >&2 |
echo " [--host-only] [--devtree=<devicetree.dtb>] [--devtreedir=</devicetree/path/>]" >&2 |
169 |
echo " <--install | --remove | --update> <kernel-version>" >&2 |
echo " <--install | --remove | --update> <kernel-version>" >&2 |
170 |
echo " (ex: $(basename $0) --mkinitrd --depmod --install 2.4.7-2)" >&2 |
echo " (ex: $(basename $0) --mkinitrd --depmod --install 2.4.7-2)" >&2 |
171 |
exit 1 |
exit 1 |
236 |
fi |
fi |
237 |
|
|
238 |
DEVTREE="" |
DEVTREE="" |
239 |
if [[ x${devtreefile} != x ]] && [ -f "${devtreefile}" ] |
if [[ -n ${devtreefile} ]] && [ -f ${devtreefile} ] |
240 |
then |
then |
241 |
[[ -n ${verbose} ]] && echo "found ${devtreefile} and using it with grubby" |
[[ -n ${verbose} ]] && echo "found ${devtreefile} and using it with grubby" |
242 |
DEVTREE="--devtree ${devtreefile}" |
DEVTREE="--devtree ${devtreefile}" |
243 |
fi |
fi |
244 |
|
|
245 |
|
DEVTREEDIR="" |
246 |
|
if [[ -n ${devtreedir} ]] && [ -d ${devtreedir} ] |
247 |
|
then |
248 |
|
[ -n ${verbose} ] && echo "found ${devtreedir} and using it with grubby" |
249 |
|
DEVTREEDIR="--devtreedir ${devtreedir}" |
250 |
|
fi |
251 |
|
|
252 |
# FIXME: is this a good heuristic to find out if we're on iSeries? |
# FIXME: is this a good heuristic to find out if we're on iSeries? |
253 |
if [ -d /proc/iSeries ] |
if [ -d /proc/iSeries ] |
254 |
then |
then |
359 |
[[ -n ${verbose} ]] && echo "adding ${version} to ${extlinuxConfig}" |
[[ -n ${verbose} ]] && echo "adding ${version} to ${extlinuxConfig}" |
360 |
|
|
361 |
ARGS="--extlinux -c ${extlinuxConfig} --add-kernel=${kernelImage} \ |
ARGS="--extlinux -c ${extlinuxConfig} --add-kernel=${kernelImage} \ |
362 |
${DEVTREE} ${INITRD} --copy-default --title \"${title}\${debugtitle}\" \ |
${DEVTREEDIR} ${DEVTREE} \ |
363 |
|
${INITRD} --copy-default --title \"${title}\${debugtitle}\" \ |
364 |
${mbkernel:+--add-multiboot=\"${mbkernel}\"} \ |
${mbkernel:+--add-multiboot=\"${mbkernel}\"} \ |
365 |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
${mbargs:+--mbargs=\"${mbargs}\"} \ |
366 |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
--args=\"root=${rootdevice} ${kernargs} \${debugargs}\" \ |
514 |
fi |
fi |
515 |
|
|
516 |
DEVTREE="" |
DEVTREE="" |
517 |
if [[ x${devtreefile} != x ]] && [ -f ${devtreefile} ] |
if [[ -n ${devtreefile} ]] && [ -f ${devtreefile} ] |
518 |
then |
then |
519 |
[[ -n ${verbose} ]] && echo "found ${devtreefile} and using it with grubby" |
[[ -n ${verbose} ]] && echo "found ${devtreefile} and using it with grubby" |
520 |
DEVTREE="--devtree ${devtreefile}" |
DEVTREE="--devtree ${devtreefile}" |
521 |
fi |
fi |
522 |
|
|
523 |
|
DEVTREEDIR="" |
524 |
|
if [[ -n ${devtreedir} ]] && [ -d ${devtreedir} ] |
525 |
|
then |
526 |
|
[[ -n ${verbose} ]] && echo "found ${devtreedir} and using it with grubby" |
527 |
|
DEVTREEDIR="--devtreedir ${devtreedir}" |
528 |
|
fi |
529 |
|
|
530 |
if [[ -n ${cfgGrub} ]] |
if [[ -n ${cfgGrub} ]] |
531 |
then |
then |
532 |
[[ -n ${verbose} ]] && echo "updating ${version} from ${grubConfig}" |
[[ -n ${verbose} ]] && echo "updating ${version} from ${grubConfig}" |
629 |
then |
then |
630 |
[[ -n ${verbose} ]] && echo "updating ${version} from ${extlinuxConfig}" |
[[ -n ${verbose} ]] && echo "updating ${version} from ${extlinuxConfig}" |
631 |
ARGS="--extlinux -c ${extlinuxConfig} --update-kernel=${kernelImage} \ |
ARGS="--extlinux -c ${extlinuxConfig} --update-kernel=${kernelImage} \ |
632 |
${DEVTREE} ${INITRD} ${kernargs:+--args=\"${kernargs}\"} \ |
${DEVTREE} ${DEVTREEDIR} ${INITRD} ${kernargs:+--args=\"${kernargs}\"} \ |
633 |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
${removeargs:+--remove-args=\"${removeargs}\"} \ |
634 |
--title=\"${title}\${debugtitle}\"" |
--title=\"${title}\${debugtitle}\"" |
635 |
rungrubby --debug ${ARGS} |
rungrubby --debug ${ARGS} |
708 |
shift |
shift |
709 |
fi |
fi |
710 |
;; |
;; |
711 |
|
|
712 |
|
--devtreedir*) |
713 |
|
if [[ $1 == --devtreedir\=* ]] |
714 |
|
then |
715 |
|
devtreedir=${1#--devtreedir=} |
716 |
|
else |
717 |
|
devtreedir=$2 |
718 |
|
shift |
719 |
|
fi |
720 |
|
;; |
721 |
|
|
722 |
--dracut) |
--dracut) |
723 |
dracut=--dracut |
dracut=--dracut |