svn commit: samba r8143 - branches/SAMBA_3_0/examples/scripts/python
trunk/examples/scripts/python
gd at samba.org
gd at samba.org
Mon Jul 4 13:36:41 GMT 2005
Author: gd
Date: 2005-07-04 13:36:41 +0000 (Mon, 04 Jul 2005)
New Revision: 8143
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8143
Log:
Fix generate_parm_table.py:
* Correctly substitute "\" as default winbind separator.
* Use default testparm-location.
Guenther
Modified:
branches/SAMBA_3_0/examples/scripts/python/generate_parm_table.py
trunk/examples/scripts/python/generate_parm_table.py
Changeset:
Modified: branches/SAMBA_3_0/examples/scripts/python/generate_parm_table.py
===================================================================
--- branches/SAMBA_3_0/examples/scripts/python/generate_parm_table.py 2005-07-04 13:20:37 UTC (rev 8142)
+++ branches/SAMBA_3_0/examples/scripts/python/generate_parm_table.py 2005-07-04 13:36:41 UTC (rev 8143)
@@ -57,7 +57,7 @@
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 @@
## 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 @@
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 @@
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 ##
Modified: trunk/examples/scripts/python/generate_parm_table.py
===================================================================
--- trunk/examples/scripts/python/generate_parm_table.py 2005-07-04 13:20:37 UTC (rev 8142)
+++ trunk/examples/scripts/python/generate_parm_table.py 2005-07-04 13:36:41 UTC (rev 8143)
@@ -57,7 +57,7 @@
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 @@
## 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 @@
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 @@
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 ##
More information about the samba-cvs
mailing list