upgradeprovision: Only backup sysvol directory if it exists.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 26 Feb 2012 23:53:19 +0000 (00:53 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 27 Feb 2012 02:52:05 +0000 (03:52 +0100)
This is not the case for standalone installations.

Bug: https://bugs.launchpad.net/samba/+bug/930370
Bug: https://bugzilla.samba.org/show_bug.cgi?id=8781

source4/scripting/bin/upgradeprovision

index ba9e5e5c0acfafd936ddbb8ce27471d223aab4f2..8066ac38d484715c94e0b040193475363ecf656e 100755 (executable)
@@ -1471,7 +1471,8 @@ def backup_provision(paths, dir):
     :param paths: Paths to different objects
     :param dir: Directory where to store the backup
     """
-    copytree_with_xattrs(paths.sysvol, os.path.join(dir, "sysvol"))
+    if paths.sysvol is not None:
+        copytree_with_xattrs(paths.sysvol, os.path.join(dir, "sysvol"))
     shutil.copy2(paths.samdb, dir)
     shutil.copy2(paths.secrets, dir)
     shutil.copy2(paths.idmapdb, dir)