ports/113707: PostgreSQL RC start script does not work if you change the pgsql user name.

Markus Banfi paidhi at mospheira.net
Fri Jun 15 12:10:07 UTC 2007


>Number:         113707
>Category:       ports
>Synopsis:       PostgreSQL RC start script does not work if you change the pgsql user name.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 15 12:10:05 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Markus Banfi
>Release:        6.2-RELEASE-p5
>Organization:
>Environment:
FreeBSD vmb07w.local.net 6.2-RELEASE-p5 FreeBSD 6.2-RELEASE-p5 #1: Sat Jun  9 10:32:34 CEST 2007     toor at vmb07w.local.net:/usr/obj/usr/src/sys/VMB07  i386
>Description:
Port: postgresql-server-8.2.4_1

/usr/local/etc/rc.d/postgresql does not work if you change the name of the PostgreSQL user from "pgsql" to (e.g.) "postgres". The rc script has "postgresql_user=pgsql" hardcoded. Setting another username in /etc/rc.conf (postgresql_user=...) is therefore ignored.

>How-To-Repeat:
1. Rename the PostgreSQL OS user name with PW(8).
2. Run "/usr/local/etc/rc.d/postgresql start"
3. It will say: "su: unknown login: pgsql"
>Fix:
The line in /usr/local/etc/rc.d/postgresql should be modified like this (diff output):
# diff postgresql.new postgresql.org 
36c36
< postgresql_user=${postgresql_user:-"pgsql"}
---
> postgresql_user=pgsql


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list