aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-09-21 23:10:56 +0000
committerWarner Losh <imp@FreeBSD.org>2017-09-21 23:10:56 +0000
commit07f2d905e680fab62da966b18fbc55b632b6d477 (patch)
tree71df40912b6a9d639ac8b8052c9abf2acb472d33 /tools
parente1d15b892a3dd9e0b05a23c8248ccac86aee0493 (diff)
downloadsrc-07f2d905e680fab62da966b18fbc55b632b6d477.tar.gz
src-07f2d905e680fab62da966b18fbc55b632b6d477.zip
Notes
Diffstat (limited to 'tools')
-rwxr-xr-xtools/tools/nanobsd/defaults.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh
index 0a1841ee4364..afc7967281a8 100755
--- a/tools/tools/nanobsd/defaults.sh
+++ b/tools/tools/nanobsd/defaults.sh
@@ -527,15 +527,20 @@ setup_nanobsd ( ) (
# have hardcoded paths under ${prefix}/etc are not tweakable.
if [ -d usr/local/etc ] ; then
(
- mkdir -p etc/local
cd usr/local/etc
find . -print | cpio -dumpl ../../../etc/local
cd ..
rm -rf etc
- ln -s ../../etc/local etc
)
fi
+ # Always setup the usr/local/etc -> etc/local symlink.
+ # usr/local/etc gets created by packages, but if no packages
+ # are installed by this point, but are later in the process,
+ # the symlink not being here causes problems. It never hurts
+ # to have the symlink in error though.
+ ln -s ../../etc/local usr/local/etc
+
for d in var etc
do
# link /$d under /conf
@@ -581,6 +586,9 @@ setup_nanobsd_etc ( ) (
echo "/dev/${NANO_DRIVE}${NANO_ROOT} / ufs ro 1 1" > etc/fstab
echo "/dev/${NANO_DRIVE}${NANO_SLICE_CFG} /cfg ufs rw,noauto 2 2" >> etc/fstab
mkdir -p cfg
+
+ # Create directory for eventual /usr/local/etc contents
+ mkdir -p etc/local
)
)