When parsing 'param = value', don't split 'value' at spaces.
authorVolker Lendecke <vlendec@samba.org>
Sun, 14 Dec 2003 17:47:15 +0000 (17:47 +0000)
committerVolker Lendecke <vlendec@samba.org>
Sun, 14 Dec 2003 17:47:15 +0000 (17:47 +0000)
Thanks to Ralf Spenneberg for the fix.

Volker
(This used to be commit bc383582b248518e39225405d0def411d552aa7d)

examples/misc/modify_samba_config.pl

index eb997f9b0c87097bfe0da35a3cecf8d3e136a591..ad958625d66481042819cf8412e46b47fec5f839 100755 (executable)
@@ -66,7 +66,7 @@ while (<CONFIGFILE>) {
        
        ## check for a param = value
        if ($_ =~ /=/) {
        
        ## check for a param = value
        if ($_ =~ /=/) {
-               ($param, $value) = split (/=/, $_);
+               ($param, $value) = split (/=/, $_,2);
                $param =~ s/./\l$&/g;
                $param =~ s/\s+//g;
                $value =~ s/^\s+//;
                $param =~ s/./\l$&/g;
                $param =~ s/\s+//g;
                $value =~ s/^\s+//;