svn commit: r256331 - head/usr.sbin/bsdconfig/share

Devin Teske dteske at FreeBSD.org
Fri Oct 11 20:08:35 UTC 2013


Author: dteske
Date: Fri Oct 11 20:08:34 2013
New Revision: 256331
URL: http://svnweb.freebsd.org/changeset/base/256331

Log:
  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:
  head/usr.sbin/bsdconfig/share/variable.subr

Modified: head/usr.sbin/bsdconfig/share/variable.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/variable.subr	Fri Oct 11 20:07:04 2013	(r256330)
+++ head/usr.sbin/bsdconfig/share/variable.subr	Fri Oct 11 20:08:34 2013	(r256331)
@@ -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
 
 #
@@ -264,6 +279,7 @@ f_variable_new VAR_SLOW_ETHER		slowEther
 f_variable_new VAR_TRY_DHCP		tryDHCP
 f_variable_new VAR_TRY_RTSOL		tryRTSOL
 f_variable_new VAR_UFS_PATH		ufs
+f_variable_new VAR_ZFSINTERACTIVE	zfsInteractive
 
 #
 # Self-initialize unless requested otherwise


More information about the svn-src-head mailing list