Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Oct 2013 20:08:34 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r256331 - head/usr.sbin/bsdconfig/share
Message-ID:  <201310112008.r9BK8YjT083469@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help

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



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