KERNEL_NAME=-olinuxino KERNEL_VERSION=2.6.35-7-ARCH+ flush_kernel() { echo "Do you want the new kernel flashed onto mmcblk0p1? [y|N] " # something traps the last line of output, so users can't see the # question ... read -r shouldwe if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then echo "" echo "Specify NTSC or PAL display output [N|P]: " read -r disp if [[ $disp =~ ^([nN][tT][sS][cC]|[nN])$ ]]; then echo "Writing the NTSC kernel image on /dev/mmcblk0p1 ..." dd if=/boot/oli-${KERNEL_VERSION}-ntsc.sb of=/dev/mmcblk0p1 ibs=512 seek=4 conv=sync,notrunc fi if [[ $disp =~ ^([pP][aA][lL]|[pP])$ ]]; then echo "Writing the PAL kernel image on /dev/mmcblk0p1 ..." dd if=/boot/oli-${KERNEL_VERSION}-pal.sb of=/dev/mmcblk0p1 ibs=512 seek=4 conv=sync,notrunc fi fi } ## arg 1: the new package version post_install() { flush_kernel # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} } ## arg 1: the new package version ## arg 2: the old package version post_upgrade() { flush_kernel # updating module dependencies echo ">>> Updating module dependencies. Please wait ..." depmod ${KERNEL_VERSION} }