samba_upgradedns: message the user if they need to change smb.conf
authorRicky Nance <ricky.nance@gmail.com>
Tue, 31 Dec 2013 16:58:16 +0000 (10:58 -0600)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 7 Jan 2014 05:05:15 +0000 (06:05 +0100)
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jan  7 06:05:15 CET 2014 on sn-devel-104

source4/scripting/bin/samba_upgradedns

index d2c96cc1c274b2d8ade20e5750c68a0ae9620c07..c4f21449699c8ef3ab24d80d44de6a1a630f2b2a 100755 (executable)
@@ -500,3 +500,19 @@ if __name__ == '__main__':
                 logger.info("Failed to delete %s from sam.ldb" % dn)
 
     logger.info("Finished upgrading DNS")
+
+    services = lp.get("server services")
+    for service in services:
+        if service == "dns":
+            if opts.dns_backend.startswith("BIND"):
+                logger.info("You have switched to using %s as your dns backend,"
+                        " but still have the internal dns starting. Please"
+                        " make sure you add '-dns' to your server services"
+                        " line in your smb.conf." % opts.dns_backend)
+            break
+    else:
+        if opts.dns_backend == "SAMBA_INTERNAL":
+            logger.info("You have switched to using %s as your dns backend,"
+                    " but you still have samba starting looking for a"
+                    " BIND backend. Please remove the -dns from your"
+                    " server services line." % opts.dns_backend)