Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Apr 2014 22:32:46 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
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
Message-ID:  <201404132232.s3DMWkNI077529@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404132232.s3DMWkNI077529>