Subject: pkg/18572: postgresql start script fails with 'ambiguous redirect'
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hf@tangro.de>
List: netbsd-bugs
Date: 10/07/2002 19:08:52
>Number:         18572
>Category:       pkg
>Synopsis:       postgresql start script fails with 'ambiguous redirect'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 07 10:09:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Hauke Fath
>Release:        NetBSD 1.5ZC
>Organization:
Tangro GmbH -- does not speak for me and vice versa.
>Environment:
System: NetBSD scree.tangro.de 1.5ZC NetBSD 1.5ZC (SCREE-MP) #2: 
Tue Jul 2 19:37:57 CEST 2002 
hf@scree.tangro.de:/usr/src/sys-mp-i386/arch/i386/compile/SCREE-MP i386
Architecture: i386
Machine: i386
>Description:
	The rc.d start script that is installed with postgresql 7.2.2
	fails with


[hf@scree] /etc # sh -vx /etc/rc.d/pgsql start 

[...]

+ [ start != start ]
+ eval _cmd=$start_cmd _precmd=$start_precmd _postcmd=$start_postcmd
+ _cmd=pgsql_doit start _precmd=pgsql_precmd _postcmd=
+ [ -n pgsql_doit start ]
+ eval pgsql_precmd
+ pgsql_precmd
+ [ ! -f /usr/pkg/pgsql/data/base/1/PG_VERSION ]
+ eval pgsql_doit start
+ pgsql_doit start
+ action=start
+ command_args=-D /b/databases/pgsql/data >/var/log/pgsql.log 2>&1 & -w -s -l /usr/pkg/pgsql/errlog
+ [ -n -i -p 5432 -o -F -N 32 -B 64 ]
+ command_args=-D /b/databases/pgsql/data >/var/log/pgsql.log 2>&1 & -w -s -l /usr/pkg/pgsql/errlog -o "-i -p 5432 -o -F -N 32 -B 64"
+ [ ! -x /usr/pkg/bin/pg_ctl ]
+ echo Starting pgsql.
Starting pgsql.
+ /usr/bin/su -m pgsql -c /usr/pkg/bin/pg_ctl start -D /b/databases/pgsql/data >/var/log/pgsql.log 2>&1 & -w -s -l /usr/pkg/pgsql/errlog -o "-i -p 5432 -o -F -N 32 -B 64"
Ambiguous output redirect.
+ [ -z  ]
+ return 1

-- looks to me that the command is assembled in the wrong sequence,
but my attempts at re-ordering the parts were not successful. Some
rc.d script guru should probably take a close look.


>How-To-Repeat:
	Update a database/postgresql installation, start server (or
	try to).
 
>Fix:
	None.
>Release-Note:
>Audit-Trail:
>Unformatted: