samba-tool: Replace C version of samba-tool with python version
authorAmitay Isaacs <amitay@gmail.com>
Wed, 20 Jul 2011 23:48:30 +0000 (09:48 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 28 Jul 2011 05:20:52 +0000 (15:20 +1000)
C version of samba-tool is now called samba-tool-c, which will be
removed as soon as all the samba-tool commands are ported to python.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/samba_tool/wscript_build
source4/scripting/bin/samba-tool [moved from source4/scripting/python/samba/samba-tool.py with 94% similarity]
source4/scripting/bin/wscript_build
source4/scripting/wscript_build

index 788f8dbf7543c54e133794e9ba3827a927325604..f378b51e052b3d7122556e76ef449e7e8c7a5ea7 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-bld.SAMBA_BINARY('samba-tool',
+bld.SAMBA_BINARY('samba-tool-c',
        source='samba_tool.c vampire.c gpo.c',
        autoproto='proto.h',
        deps='samba-hostconfig samba-util samba-net popt POPT_SAMBA POPT_CREDENTIALS samba-policy auth4',
similarity index 94%
rename from source4/scripting/python/samba/samba-tool.py
rename to source4/scripting/bin/samba-tool
index 494654a78da05759c1935eac2d9da8712f902e79..9735335af5f7d1d15cc2ae41d20231f3d0880f2c 100755 (executable)
 #
 
 import sys
-from os.path import dirname
 
-samba_pymodule_dir = dirname(dirname(sys.argv[0]))
-sys.path.append(samba_pymodule_dir)
+# Find right direction when running from source tree
+sys.path.insert(0, "bin/python")
 
 from samba import netcmd
 from samba.netcmd import Command, CommandError, Option
index e52b32bc02af0110141d3c0bc79346c7a9efb15b..87387054b304929e521f9d49b40a654da0eadc9b 100644 (file)
@@ -3,3 +3,4 @@
 bld.SAMBA_SCRIPT('samba_dnsupdate', pattern='samba_dnsupdate', installdir='.')
 bld.SAMBA_SCRIPT('samba_spnupdate', pattern='samba_spnupdate', installdir='.')
 bld.SAMBA_SCRIPT('upgradeprovision', pattern='upgradeprovision', installdir='.')
+bld.SAMBA_SCRIPT('samba-tool', pattern='samba-tool', installdir='.')
index d94fc4fe9ccd10f397b44a16a4bef1c6c4650a3b..90f1f2f02149dd7b44e33c5c4b0f9f22c1a84ee3 100644 (file)
@@ -2,7 +2,7 @@
 
 from samba_utils import MODE_755
 
-bld.INSTALL_FILES('${SBINDIR}','bin/upgradeprovision bin/samba_dnsupdate bin/samba_spnupdate',
+bld.INSTALL_FILES('${SBINDIR}','bin/upgradeprovision bin/samba_dnsupdate bin/samba_spnupdate bin/samba-tool',
                   chmod=MODE_755, python_fixup=True, flat=True)
 
 bld.RECURSE('bin')