summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2015-02-09 16:29:44 +0000
committerimp <imp@FreeBSD.org>2015-02-09 16:29:44 +0000
commit84e6cc9cb53e7e4b85f886653bfbcc45a6a8513f (patch)
treec528073613a93bb36807c33c2d4c2d993d6025e7 /sys/conf
parentaf8d9a2a66fd5c959f429c3d45cae3022ba8a01e (diff)
downloadFreeBSD-src-84e6cc9cb53e7e4b85f886653bfbcc45a6a8513f.zip
FreeBSD-src-84e6cc9cb53e7e4b85f886653bfbcc45a6a8513f.tar.gz
Prefer install over mkdir to create the directory. Add test to ensure
the directory doesn't exist before creating it. This makes the NO_ROOT case actually work. Suggested by: brooks@
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/dtb.mk6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/conf/dtb.mk b/sys/conf/dtb.mk
index ea1baef..41bc9bb 100644
--- a/sys/conf/dtb.mk
+++ b/sys/conf/dtb.mk
@@ -64,9 +64,9 @@ realinstall: _dtbinstall
.ORDER: beforeinstall _kmodinstall
_dtbinstall:
# Need to create this because installkernel doesn't invoke mtree with BSD.root.mtree
-# to make sure the tree is setup properly. This may break ownership of ${DTBDIR}
-# for no-root build.
- mkdir -p ${DESTDIR}${DTBDIR}
+# to make sure the tree is setup properly. We don't recreate it to avoid duplicate
+# entries in the NO_ROOT case.
+ test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR}
.for _dtb in ${DTB}
${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \
${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR}
OpenPOWER on IntegriCloud