Subject: wwwconfig-common: pgsql-exec.sh fails to detect failure
Date: Mon, 27 Mar 2006 05:10:58 +1100
Package: wwwconfig-common
Version: 0.0.44
Severity: normal
Hi,
While debugging a failed installation of Drupal I had to investigate
pgsql-exec.sh
Here are the relevant line (I had modified pgsql-exec.sh to not
redirect /dev/null):
+++ eval psql -U drupal ''\''-d'\''' ''\''drupal'\''' ''\''-f'\'''
''\''/usr/share/drupal/database/database.pgsql'\'''
++++ psql -U drupal -d drupal -f /usr/share/drupal/database/database.pgsql
psql: FATAL: Ident authentication failed for user "drupal"
+++ rm -rf /tmp/tmp.r2htGb
+++ HOME=/home/anand
++ status=exec
psql has clearly failed, yet ther script has returned 'exec'.
If you try this manually:
postgres@eve:~$ psql -U drupal -d drupal -f /usr/share/drupal/database/database.pgsql
psql: FATAL: Ident authentication failed for user "drupal"
postgres@eve:~$ echo $?
2
So, pgsql-exec should be checking the return code and indicating
failure in this case.
Thanks,
Anand
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (650, 'testing'), (600, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
-- no debconf information
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.