summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-11-17 18:51:14 +1100
committerAmitay Isaacs <amitay@gmail.com>2011-11-18 14:38:28 +1100
commit244ecc844dc36584a01ec5248c68060f6bb97114 (patch)
treebf5b71ebd98e540afdb1be3a71398ee3ded6355b /source4/scripting
parentf93ec5a0274b3b14a5ad2cff287fcb5e48d59731 (diff)
downloadsamba-244ecc844dc36584a01ec5248c68060f6bb97114.tar.gz
samba-244ecc844dc36584a01ec5248c68060f6bb97114.tar.bz2
samba-244ecc844dc36584a01ec5248c68060f6bb97114.zip
s4-s3-upgrade: Add --verbose option to print extra details
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/netcmd/domain.py7
-rw-r--r--source4/scripting/python/samba/upgrade.py2
2 files changed, 6 insertions, 3 deletions
diff --git a/source4/scripting/python/samba/netcmd/domain.py b/source4/scripting/python/samba/netcmd/domain.py
index 9f77820855..0e6083a8b0 100644
--- a/source4/scripting/python/samba/netcmd/domain.py
+++ b/source4/scripting/python/samba/netcmd/domain.py
@@ -528,6 +528,7 @@ class cmd_domain_samba3upgrade(Command):
Option("--targetdir", type="string", metavar="DIR",
help="Path prefix where the new Samba 4.0 AD domain should be initialised"),
Option("--quiet", help="Be quiet", action="store_true"),
+ Option("--verbose", help="Be verbose", 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 storing attributes likes ntacl, auto tries to make an inteligent guess based on the user rights and system capabilities", default="auto"),
]
@@ -535,7 +536,7 @@ class cmd_domain_samba3upgrade(Command):
takes_args = ["smbconf"]
def run(self, smbconf=None, targetdir=None, dbdir=None, testparm=None,
- quiet=False, use_xattrs=None, sambaopts=None, versionopts=None):
+ quiet=False, verbose=False, use_xattrs=None, sambaopts=None, versionopts=None):
if not os.path.exists(smbconf):
raise CommandError("File %s does not exist" % smbconf)
@@ -550,7 +551,9 @@ class cmd_domain_samba3upgrade(Command):
raise CommandError("Please specify either dbdir or testparm")
logger = self.get_logger()
- if quiet:
+ if verbose:
+ logger.setLevel(logging.DEBUG)
+ elif quiet:
logger.setLevel(logging.WARNING)
else:
logger.setLevel(logging.INFO)
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index 5b0088737c..11999608aa 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -237,7 +237,7 @@ def add_users_to_group(samdb, group, members, logger):
samdb.modify(m)
except ldb.LdbError, (ecode, emsg):
if ecode == ldb.ERR_ENTRY_ALREADY_EXISTS:
- logger.info("skipped re-adding member '%s' to group '%s': %s", member_sid, group.sid, emsg)
+ logger.debug("skipped re-adding member '%s' to group '%s': %s", member_sid, group.sid, emsg)
elif ecode == ldb.ERR_NO_SUCH_OBJECT:
raise ProvisioningError("Could not add member '%s' to group '%s' as either group or user record doesn't exist: %s" % (member_sid, group.sid, emsg))
else: