From owner-svn-src-all@FreeBSD.ORG Thu Dec 19 06:43:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E547B9C; Thu, 19 Dec 2013 06:43:53 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A3741044; Thu, 19 Dec 2013 06:43:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBJ6hqJa084466; Thu, 19 Dec 2013 06:43:52 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBJ6hqWH084465; Thu, 19 Dec 2013 06:43:52 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201312190643.rBJ6hqWH084465@svn.freebsd.org> From: Devin Teske Date: Thu, 19 Dec 2013 06:43:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259598 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head 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.17 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, 19 Dec 2013 06:43:53 -0000 Author: dteske Date: Thu Dec 19 06:43:52 2013 New Revision: 259598 URL: http://svnweb.freebsd.org/changeset/base/259598 Log: When using a bootpool, set the cachefile property so that it gets imported automatically upon reboot to the newly installed system. MFC after: 1 day Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Thu Dec 19 06:41:30 2013 (r259597) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Thu Dec 19 06:43:52 2013 (r259598) @@ -1152,7 +1152,7 @@ zfs_create_boot() fi # While this is apparently not needed, it seems to help MBR - f_dprintf "$funcname: Configuring zpool.cache..." + f_dprintf "$funcname: Configuring zpool.cache for zroot..." f_eval_catch $funcname mkdir "$MKDIR_P" $BSDINSTALL_CHROOT/boot/zfs || return $FAILURE f_eval_catch $funcname zpool "$ZPOOL_SET" \ @@ -1174,6 +1174,12 @@ zfs_create_boot() # We're all done unless we should go on for boot pool [ "$ZFSBOOT_BOOT_POOL" ] || return $SUCCESS + # Set cachefile for boot pool so it auto-imports at system start + f_dprintf "$funcname: Configuring zpool.cache for boot pool..." + f_eval_catch $funcname zpool "$ZPOOL_SET" \ + "cachefile=\"$BSDINSTALL_CHROOT/boot/zfs/zpool.cache\"" \ + "$bootpool_name" || return $FAILURE + # Some additional geli(8) requirements for loader.conf(5) for option in \ 'zpool_cache_load=\"YES\"' \