installer: bug 1640: deal with '$' in passwords
authorGalen Charlton <galen.charlton@liblime.com>
Tue, 18 Dec 2007 17:31:11 +0000 (11:31 -0600)
committerGalen Charlton <galen.charlton@liblime.com>
Tue, 18 Dec 2007 17:31:11 +0000 (11:31 -0600)
Makefile.PL

index 5945081..2c619f4 100644 (file)
@@ -1096,9 +1096,14 @@ sub postamble {
     # so that Make will export as environment
     # variables -- this is for the use of
     # rewrite-confg.PL
-    my $env = join("\n", map { "export __${_}__ = $target_directories->{$_}" } keys %$target_directories); 
+    my $env = join("\n", map { "export __${_}__ := $target_directories->{$_}" } keys %$target_directories); 
     $env .= "\n\n";
-    $env .= join("\n", map { "export __${_}__ = $config{$_}" } keys %config);
+
+    # quote '$' in the two password parameters
+    my %config = %config;
+    $config{'DB_PASS'} =~ s/\$/\$\$/g;
+    $config{'ZEBRA_PASS'} =~ s/\$/\$\$/g;
+    $env .= join("\n", map { "export __${_}__ := $config{$_}" } keys %config);
     return "$env\n";
 }