svn commit: r264427 - stable/9/usr.sbin/bsdconfig/share

Devin Teske dteske at FreeBSD.org
Sun Apr 13 22:32:47 UTC 2014


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


More information about the svn-src-stable-9 mailing list