summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-07-04 13:36:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:11 -0500
commit1affb32caa44d677f587ed15374812227f60202c (patch)
tree48413286a65f23cfad4b4820765f6fb05b4218ff /examples
parent9b62dfaf19b5fc853393bf367f9c61f547d835d3 (diff)
downloadsamba-1affb32caa44d677f587ed15374812227f60202c.tar.gz
samba-1affb32caa44d677f587ed15374812227f60202c.tar.bz2
samba-1affb32caa44d677f587ed15374812227f60202c.zip
r8143: Fix generate_parm_table.py:
* Correctly substitute "\" as default winbind separator. * Use default testparm-location. Guenther (This used to be commit ba0ca4c0c62d7f8801115bec54b9c550e3b1b1c6)
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/scripts/python/generate_parm_table.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/scripts/python/generate_parm_table.py b/examples/scripts/python/generate_parm_table.py
index d25ff6616e..1dbc071e9b 100755
--- a/examples/scripts/python/generate_parm_table.py
+++ b/examples/scripts/python/generate_parm_table.py
@@ -57,7 +57,7 @@ P_GLOBAL = 1
FOOTER = """##### end of smbparm.y ##########################################
#################################################################"""
-TESTPARM = "/opt/src/samba-cvs/samba-3.0/source/bin/testparm"
+TESTPARM = "/usr/bin/testparm"
## fields in Samba's parameter table
displayName = 0
@@ -89,7 +89,7 @@ obj_table = {
## First thing is to build the dictionary of parmeter names ##
## based on the output from testparm ##
-cmd = "/opt/samba/bin/testparm -s -v /dev/null"
+cmd = "/usr/bin/testparm -s -v /dev/null"
( status, testparm_output ) = commands.getstatusoutput( cmd )
if status:
sys.stderr.write( "Failed to execute testparm!\n%s\n" % testparm_output )
@@ -111,7 +111,8 @@ for input_str in lines:
parts[0] = string.strip( parts[0] )
parts[1] = string.strip( parts[1] )
key = string.upper( string.join(string.split(parts[0]), "") )
- def_values[key] = parts[1]
+ new = parts[1].replace('\\', '\\\\')
+ def_values[key] = new
## open loadparm.c and get the entire list of parameters ##
## including synonums ##
@@ -153,6 +154,7 @@ while True:
key = string.upper( string.join(string.split(name), "") )
var_name = string.strip( parm[variable] )
+
## try to catch synonyms -- if the parameter was not reported ##
## by testparm, then save it and come back after we will out ##
## the variable list ##