#! /bin/sh

PREREQ="disks grub"

prereqs()
{
	echo "$PREREQ"
}

case $1 in
prereqs)
	prereqs
	exit 0
	;;
esac

. /scripts/functions
. /scripts/functions-uniklu

if [ "$BOOT" = "installimage" ]; then
  [ "$quiet" != "y" ] && _log_msg "Performing extra install tasks ..."
  TARGET=/target
  if [ -d ${TARGET}/etc/multiboot.d/installimage ]; then
    EXTRA_TASKS=$(find ${TARGET}/etc/multiboot.d/installimage -name "*.sh")
    if [ -n "${EXTRA_TASKS}" ]; then
      for i in ${EXTRA_TASKS}; do
        if [ -x $i ]; then
          $i
        fi
      done
    fi
  fi
  [ "$quiet" != "y" ] && log_end_msg
fi
