mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
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:
parent
d7c0bff411
commit
6c243dd175
4 changed files with 32 additions and 0 deletions
|
|
@ -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 ; \
|
||||
|
|
|
|||
|
|
@ -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 ; \
|
||||
|
|
|
|||
|
|
@ -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 ; \
|
||||
|
|
|
|||
|
|
@ -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 ; \
|
||||
|
|
|
|||
Loading…
Reference in a new issue