From owner-svn-src-all@freebsd.org Thu Sep 21 23:10:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 600F5E28D4C; Thu, 21 Sep 2017 23:10:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DDBC6EC4D; Thu, 21 Sep 2017 23:10:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8LNAu89095197; Thu, 21 Sep 2017 23:10:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8LNAuvh095196; Thu, 21 Sep 2017 23:10:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201709212310.v8LNAuvh095196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 21 Sep 2017 23:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323883 - head/tools/tools/nanobsd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd X-SVN-Commit-Revision: 323883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2017 23:10:57 -0000 Author: imp Date: Thu Sep 21 23:10:56 2017 New Revision: 323883 URL: https://svnweb.freebsd.org/changeset/base/323883 Log: Always create usr/local/etc -> /etc/local symlink /usr/local/etc gets created and populated by packages. However, if no packages are installed when setup_nanobsd is run, this symlink won't get created, causing problems if packages are installed later (say on first boot). Therefore, always create the symlink and etc/local. It does no harm and may help. Inspired by crochet issue #183 (consuingly says NanoBSD, means crochet) Sponsored by: Netflix Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Thu Sep 21 23:05:32 2017 (r323882) +++ head/tools/tools/nanobsd/defaults.sh Thu Sep 21 23:10:56 2017 (r323883) @@ -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 ) )