#! /bin/sh

set -e

version="$1"
vmlinuz_location="$2"

if [ -n "$DEB_MAINT_PARAMS" ]; then
    eval set -- "$DEB_MAINT_PARAMS"
    if [ -z "$1" ] || [ "$1" != "configure" ]; then
        exit 0;
    fi
fi

# passing the kernel version is required
[ -z "$version" ] && exit 1

# Copy the image to uImage
if [ -f /boot/uImage ]; then
	cp -f /boot/uImage-$version /boot/uImage
fi
if [ -f /media/boot/uImage ]; then
	cp -f /boot/uImage-$version /media/boot/uImage
fi
