summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-03-23 07:48:58 +0000
committerru <ru@FreeBSD.org>2006-03-23 07:48:58 +0000
commit4bbdee9e8f84810dd53c6030e15485def2466f4e (patch)
tree6a0bd124d1f7a00fd6713b5ac8608b67d3237613 /release
parent311d69f6202d4e923371ba22aa79e9e3fc521e6e (diff)
downloadFreeBSD-src-4bbdee9e8f84810dd53c6030e15485def2466f4e.zip
FreeBSD-src-4bbdee9e8f84810dd53c6030e15485def2466f4e.tar.gz
Assert that /dev/null is a character device in a chroot early. Otherwise,
we might get surprises later, like /dev/null having error in the 4th line reported by make(1). :-) Tested by: Dmitriy Kirhlarov (who attempted to make release in a jail)
Diffstat (limited to 'release')
-rw-r--r--release/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/release/Makefile b/release/Makefile
index 9bad024..559b32b 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -512,6 +512,10 @@ release rerelease:
# NB: these may fail if the host is running w/o devfs
echo "umount /dev >/dev/null 2>&1 || true" >> ${_MK}
echo "mount -t devfs devfs /dev >/dev/null 2>&1 || true" >> ${_MK}
+ echo "if [ ! -c /dev/null ]; then" >> ${_MK}
+ echo " echo /dev/null is not a device!" >> ${_MK}
+ echo " exit 1" >> ${_MK}
+ echo "fi" >> ${_MK}
echo "if [ -x /etc/rc.d/ldconfig ]; then" >> ${_MK}
echo " /etc/rc.d/ldconfig start" >> ${_MK}
echo "else" >> ${_MK}
OpenPOWER on IntegriCloud