1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-16 00:23:52 +03:00

samba-tool domain provision: better message if tdbbackup missing

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12893

Reported-by: Jeff Sadowski <jeff.sadowski@gmail.com>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall
2022-08-22 11:48:53 +12:00
committed by Douglas Bagnall
parent f580c8b042
commit 98e85fc611
2 changed files with 10 additions and 0 deletions

View File

@@ -32,6 +32,10 @@ def tdb_copy(file1, file2, readonly=False):
toolpath = os.path.join(d, "tdbbackup")
if os.path.exists(toolpath):
break
else:
# we did not find a path to tdbbackup
raise FileNotFoundError(2, "could not find tdbbackup tool: "
"is tdb-tools installed?")
tdbbackup_cmd = [toolpath, "-s", ".copy.tdb", file1]
if readonly: