From 607f4b1cc5e20bb7f66ba2bab05e306f43628c2d Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 25 May 2011 22:01:17 -0400 Subject: [PATCH] Be more explicit for ENV defaults, to prevent confusion with simple database names such as "X" --- bucardo_ctl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bucardo_ctl b/bucardo_ctl index bcc34ec7d..f9eadd752 100755 --- a/bucardo_ctl +++ b/bucardo_ctl @@ -742,8 +742,8 @@ sub add_database { type dbtype 0 postgres dbname dbname 0 $item_name user|dbuser|pguser dbuser 0 bucardo - host|dbhost|pghost dbhost 0 PGHOSTADDR|PGHOST - port|dbport|pgport dbport numeric PGPORT + host|dbhost|pghost dbhost 0 ENV:PGHOSTADDR|PGHOST + port|dbport|pgport dbport numeric ENV:PGPORT pass|dbpass dbpass 0 null conn|dbconn|pgconn dbconn 0 null stat|status status =active|inactive null @@ -7717,8 +7717,8 @@ sub process_simple_args { $item{$name} = [$dbcol,$flag,$default]; $alias{$name} = $alias; } - ## Got all caps? Possible environment variable default - if ($default !~ /[a-z]/ and $default =~ /[A-Z]/) { + ## Process environment variable default + if ($default =~ s/^ENV://) { for my $env (split /\|/ => $default) { if ($ENV{$env}) { -- 2.39.5