Use convenience function for finding setup_dir based on location of
[ira/wip.git] / source4 / setup / upgrade
index 9c1a0cfce819b56b7e0d6cdb7c27b95f09559106..3d1316949f729e11567d33f9eb0b8fcd46b786f1 100755 (executable)
@@ -65,13 +65,14 @@ else:
     smbconf = os.path.join(libdir, "smb.conf")
 samba3 = Samba3(libdir, smbconf)
 
     smbconf = os.path.join(libdir, "smb.conf")
 samba3 = Samba3(libdir, smbconf)
 
+from samba.provision import find_setup_dir
 from samba.upgrade import upgrade_provision
 
 message("Provisioning\n")
 
 setup_dir = opts.setupdir
 if setup_dir is None:
 from samba.upgrade import upgrade_provision
 
 message("Provisioning\n")
 
 setup_dir = opts.setupdir
 if setup_dir is None:
-       setup_dir = os.path.dirname(__file__)
+       setup_dir = find_setup_dir()
 
 lp = sambaopts.get_loadparm()
 smbconf = lp.configfile
 
 lp = sambaopts.get_loadparm()
 smbconf = lp.configfile