From owner-svn-src-head@FreeBSD.ORG Fri Nov 21 14:53:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF43D10E; Fri, 21 Nov 2014 14:53:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 BBDA0B15; Fri, 21 Nov 2014 14:53:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sALErhmh018220; Fri, 21 Nov 2014 14:53:43 GMT (envelope-from n_hibma@FreeBSD.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sALErhx0018219; Fri, 21 Nov 2014 14:53:43 GMT (envelope-from n_hibma@FreeBSD.org) Message-Id: <201411211453.sALErhx0018219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: n_hibma set sender to n_hibma@FreeBSD.org using -f From: Nick Hibma Date: Fri, 21 Nov 2014 14:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274792 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2014 14:53:43 -0000 Author: n_hibma Date: Fri Nov 21 14:53:42 2014 New Revision: 274792 URL: https://svnweb.freebsd.org/changeset/base/274792 Log: Simply remove the tmp dir before creating the symlink. We are doing chroots all over the place, so there is bound to be a stale file lying around in there (in my case samba lock files from creating accounts). If we don't do that, the symlink later will fail. Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Fri Nov 21 12:35:18 2014 (r274791) +++ head/tools/tools/nanobsd/nanobsd.sh Fri Nov 21 14:53:42 2014 (r274792) @@ -421,7 +421,7 @@ setup_nanobsd ( ) ( echo "mount -o ro /dev/${NANO_DRIVE}s3" > conf/default/etc/remount # Put /tmp on the /var ramdisk (could be symlink already) - test -d tmp && rmdir tmp || nano_rm -f tmp + nano_rm -rf tmp ln -s var/tmp tmp ) > ${NANO_OBJ}/_.dl 2>&1