Add some anti-foot-shooting protection to the kernel install target.

Do not install a kernel unless a device.hints exists.  Yes, you can
create an empty hints file if you refuse to use them.
This commit is contained in:
Peter Wemm 2000-08-25 19:16:43 +00:00
parent d7c0bff411
commit 6c243dd175
4 changed files with 32 additions and 0 deletions

View file

@ -259,6 +259,14 @@ kernel-tags:
sed -e 's, ../, ,' tags > tags1
kernel-install kernel-install.debug:
@if [ ! -f ${DESTDIR}/boot/device.hints ] ; then \
echo "You must set up a /boot/device.hints file first." ; \
exit 1 ; \
fi
@if [ x"`grep device.hints /boot/defaults/loader.conf /boot/loader.conf`" = "x" ]; then \
echo "You must activate /boot/device.hints in loader.conf." ; \
exit 1 ; \
fi
@if [ ! -f ${KERNEL}${.TARGET:S/kernel-install//} ] ; then \
echo "You must build a kernel first." ; \
exit 1 ; \

View file

@ -214,6 +214,14 @@ kernel-tags:
sed -e 's, ../, ,' tags > tags1
kernel-install kernel-install.debug:
@if [ ! -f ${DESTDIR}/boot/device.hints ] ; then \
echo "You must set up a /boot/device.hints file first." ; \
exit 1 ; \
fi
@if [ x"`grep device.hints /boot/defaults/loader.conf /boot/loader.conf`" = "x" ]; then \
echo "You must activate /boot/device.hints in loader.conf." ; \
exit 1 ; \
fi
@if [ ! -f ${KERNEL}${.TARGET:S/kernel-install//} ] ; then \
echo "You must build a kernel first." ; \
exit 1 ; \

View file

@ -217,6 +217,14 @@ kernel-tags:
sed -e 's, ../, ,' tags > tags1
kernel-install kernel-install.debug:
@if [ ! -f ${DESTDIR}/boot/device.hints ] ; then \
echo "You must set up a /boot/device.hints file first." ; \
exit 1 ; \
fi
@if [ x"`grep device.hints /boot/defaults/loader.conf /boot/loader.conf`" = "x" ]; then \
echo "You must activate /boot/device.hints in loader.conf." ; \
exit 1 ; \
fi
@if [ ! -f ${KERNEL}${.TARGET:S/kernel-install//} ] ; then \
echo "You must build a kernel first." ; \
exit 1 ; \

View file

@ -214,6 +214,14 @@ kernel-tags:
sed -e 's, ../, ,' tags > tags1
kernel-install kernel-install.debug:
@if [ ! -f ${DESTDIR}/boot/device.hints ] ; then \
echo "You must set up a /boot/device.hints file first." ; \
exit 1 ; \
fi
@if [ x"`grep device.hints /boot/defaults/loader.conf /boot/loader.conf`" = "x" ]; then \
echo "You must activate /boot/device.hints in loader.conf." ; \
exit 1 ; \
fi
@if [ ! -f ${KERNEL}${.TARGET:S/kernel-install//} ] ; then \
echo "You must build a kernel first." ; \
exit 1 ; \