2009-10-18 07:12:56 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2009-12-19 04:48:47 +01:00
|
|
|
PREREQ=""
|
2009-10-18 07:12:56 +02:00
|
|
|
|
|
|
|
prereqs()
|
|
|
|
{
|
|
|
|
echo "$PREREQ"
|
|
|
|
}
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
# get pre-requisites
|
|
|
|
prereqs)
|
|
|
|
prereqs
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Busybox
|
|
|
|
. /etc/initramfs-tools/initramfs.conf
|
|
|
|
|
|
|
|
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 "Warning: 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
|
|
|
|
|
|
|
|
exit 0
|