#!/bin/sh

. /etc/control.d/functions
. /usr/lib/bootloader-utils/kernel-install-control

new_summary 'Initrd generator for BLS kernel installations'
new_help make_initrd 'Use make-initrd to build the BLS initrd'
new_help dracut 'Use dracut to build the BLS initrd'

CONFIG="$GENERATOR_LINK"

selection_status()
{
	generator_status
}

set_selection()
{
	check_plugin "$1" || return 1
	case "$1" in
		make-initrd) rm -f -- "$CONFIG" ;;
		dracut) select_profile dracut ;;
	esac
}

control_selection "$*"
