#!/bin/bash
# 2.6.35.4-default arch/s390/boot/image System.map /boot
-mmv() { [[ -e $1 ]] && mv "$1" "$2" ; }
+e() { echo "+ $*"; "$@"; }
+mmv() { [[ -e $1 ]] && mv "$1" "$2"; }
ver=$1
img=$2
dir=$4
mount "${dir}" >&/dev/null
+if [[ ! -w "${dir}" ]] ; then
+ mount "${dir}" -o remount,rw
+fi
case ${img} in
*/blackfin/*)
exit 0
;;
esac
-exec /sbin/installkernel "$@"
+
+e /sbin/installkernel "$@"
+
+case ${img} in
+*/x86*/*)
+ if [[ -e ${dir}/grub/grub.cfg ]] ; then
+ e grub-mkconfig -o /boot/grub/grub.cfg
+ fi
+ ;;
+esac