#!/bin/sh

PREREQ=""

prereqs()
{
	echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
	prereqs
	exit 0
	;;
esac

# busybox
if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then
	# those root need busybox
	eval "$(mount | awk '/ \/ / {print "r_dev=" $1; exit}')"
	if [ "${r_dev#/dev/mapper/}" != "${r_dev}" ]; then
		echo "W: Busybox is required for successful boot!"
	fi
else
	. /usr/share/initramfs-tools/hook-functions
	rm -f ${DESTDIR}/bin/sh
	rm -f ${DESTDIR}/bin/busybox
	copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
	ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
fi
