summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2018-05-14 11:30:17 +1200
committerAndrew Bartlett <abartlet@samba.org>2018-05-15 21:13:27 +0200
commitf55eab600fef592204056823ea82d89c11bd0bef (patch)
treea1bf2d5caf833a41f5ec398018a9a1d90074bcc8 /python
parentd5d8589f353974fb63caf71ba1d1fdc6f5b453ab (diff)
downloadsamba-f55eab600fef592204056823ea82d89c11bd0bef.tar.gz
samba-f55eab600fef592204056823ea82d89c11bd0bef.tar.bz2
samba-f55eab600fef592204056823ea82d89c11bd0bef.zip
samba-tool domain: Create a common --use-ntvfs option for provision, join, dcpromo and classicupgrade
The NTVFS fileserver mode is still integral to the selftest system (often simply used to make the rest of the command run and not fuss with POSIX ACLs and permissions). Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/domain.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index a1a936d98d9..9f914ea0403 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -120,6 +120,11 @@ common_provision_join_options = [
Option("--quiet", help="Be quiet", action="store_true"),
]
+common_ntvfs_options = [
+ Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)",
+ action="store_true")
+]
+
def get_testparm_var(testparm, smbconf, varname):
errfile = open(os.devnull, 'w')
p = subprocess.Popen([testparm, '-s', '-l',
@@ -280,7 +285,6 @@ class cmd_domain_provision(Command):
]
ntvfs_options = [
- Option("--use-ntvfs", action="store_true", help="Use NTVFS for the fileserver (default = no)"),
Option("--use-xattrs", type="choice", choices=["yes","no","auto"],
metavar="[yes|no|auto]",
help="Define if we should use the native fs capabilities or a tdb file for "
@@ -295,7 +299,8 @@ class cmd_domain_provision(Command):
takes_options.extend(openldap_options)
if samba.is_ntvfs_fileserver_built():
- takes_options.extend(ntvfs_options)
+ takes_options.extend(common_ntvfs_options)
+ takes_options.extend(ntvfs_options)
takes_args = []
@@ -585,12 +590,8 @@ class cmd_domain_dcpromo(Command):
takes_options.extend(common_provision_join_options)
- ntvfs_options = [
- Option("--use-ntvfs", action="store_true", help="Use NTVFS for the fileserver (default = no)"),
- ]
-
if samba.is_ntvfs_fileserver_built():
- takes_options.extend(ntvfs_options)
+ takes_options.extend(common_ntvfs_options)
takes_args = ["domain", "role?"]
@@ -1573,8 +1574,6 @@ class cmd_domain_classicupgrade(Command):
]
ntvfs_options = [
- Option("--use-ntvfs", help="Use NTVFS for the fileserver (default = no)",
- action="store_true"),
Option("--use-xattrs", type="choice", choices=["yes","no","auto"],
metavar="[yes|no|auto]",
help="Define if we should use the native fs capabilities or a tdb file for "
@@ -1583,6 +1582,7 @@ class cmd_domain_classicupgrade(Command):
default="auto")
]
if samba.is_ntvfs_fileserver_built():
+ takes_options.extend(common_ntvfs_options)
takes_options.extend(ntvfs_options)
takes_args = ["smbconf"]