From owner-svn-src-all@FreeBSD.ORG Sun Apr 13 22:32:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0485E5; Sun, 13 Apr 2014 22:32:46 +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 B1AC61CBB; Sun, 13 Apr 2014 22:32:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DMWk2o077531; Sun, 13 Apr 2014 22:32:46 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3DMWkNI077529; Sun, 13 Apr 2014 22:32:46 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201404132232.s3DMWkNI077529@svn.freebsd.org> From: Devin Teske Date: Sun, 13 Apr 2014 22:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r264427 - stable/9/usr.sbin/bsdconfig/share X-SVN-Group: stable-9 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: Sun, 13 Apr 2014 22:32:47 -0000 Author: dteske Date: Sun Apr 13 22:32:46 2014 New Revision: 264427 URL: http://svnweb.freebsd.org/changeset/base/264427 Log: MFC r256331: Add $VAR_ZFSINTERACTIVE (zfsInteractive) and new f_zfsinteractive() for determining when a script wants to be nonInteractive but selectively wants ZFS operations to be *interactive* (this is analgous to already existing $VAR_NETINTERACTIVE (netInteractive) and f_netinteractive() used for the same purpose (script wants to be nonInteractive but wants network operations to be *interactive*). Approved by: re (glebius) Modified: stable/9/usr.sbin/bsdconfig/share/variable.subr Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/bsdconfig/ (props changed) Modified: stable/9/usr.sbin/bsdconfig/share/variable.subr ============================================================================== --- stable/9/usr.sbin/bsdconfig/share/variable.subr Sun Apr 13 22:16:18 2014 (r264426) +++ stable/9/usr.sbin/bsdconfig/share/variable.subr Sun Apr 13 22:32:46 2014 (r264427) @@ -205,6 +205,21 @@ f_netinteractive() f_getvar $VAR_NETINTERACTIVE value && [ "$value" ] } +# f_zfsinteractive() +# +# Has the user specifically requested the ZFS-portion of configuration and +# setup to be performed interactively? Returns success if the user has asked +# for the ZFS configuration to be done interactively even if perhaps overall +# non-interactive mode has been requested (by setting nonInteractive). +# +# Returns success if $zfsInteractive is set and non-NULL. +# +f_zfsinteractive() +{ + local value + f_getvar $VAR_ZFSINTERACTIVE value && [ "$value" ] +} + ############################################################ MAIN # @@ -283,6 +298,7 @@ f_variable_new VAR_USER_PASSWORD userPas f_variable_new VAR_USER_PASSWORD_EXPIRE userPasswordExpire f_variable_new VAR_USER_SHELL userShell f_variable_new VAR_USER_UID userUid +f_variable_new VAR_ZFSINTERACTIVE zfsInteractive # # Self-initialize unless requested otherwise