Skip to content

Commit 018437c

Browse files
committed
Merge pull request puppetlabs#567 from antaflos/patch-1
Use correct TCP port when checking password
2 parents b77c213 + aee6dba commit 018437c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manifests/server/passwd.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
$user = $postgresql::server::user
55
$group = $postgresql::server::group
66
$psql_path = $postgresql::server::psql_path
7+
$port = $postgresql::server::port
78

89
if ($postgres_password != undef) {
910
# NOTE: this password-setting logic relies on the pg_hba.conf being
@@ -25,7 +26,7 @@
2526
# environment variable. If the password is correct (current), this
2627
# command will exit with an exit code of 0, which will prevent the main
2728
# command from running.
28-
unless => "${env} ${psql_path} -h localhost -c 'select 1' > /dev/null",
29+
unless => "${env} ${psql_path} -h localhost -p ${port} -c 'select 1' > /dev/null",
2930
path => '/usr/bin:/usr/local/bin:/bin',
3031
}
3132
}

0 commit comments

Comments
 (0)