pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/38725: pgsql_home is ignored by rc.d/pgsql when started from /etc/rc

>Number:         38725
>Category:       pkg
>Synopsis:       pgsql_home is ignored by rc.d/pgsql when started from /etc/rc
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 22 09:50:00 +0000 2008
>Originator:     Mike M. Volokhov
>Release:        OS with rc.d support + pkgsrc-current
        The NetBSD Project
System: NetBSD 4.99.55 NetBSD 4.99.55 (GENERIC) #0: Mon 
Mar 10 13:57:25 EET 2008
Architecture: i386
Machine: i386

        databases/postgresql8*-server packages are containing pgsql
        control script suitable for NetBSD rc.d system. Accordingly
        to the script pgsql_flags and pgsql_home variables can be
        used in /etc/rc.conf to adjust a PostgreSQL installation.

        rc.d/pgsql presets variables and lets them overriden by
        loading /etc/rc.conf on later stage.  Values from rc.conf
        are loaded in usual for rc.d manner - by performing
        "load_rc_config $name" call. Unfortunately, when it called
        during /etc/rc execution the load_rc_conf() from pgsql will
        not override default values set by rc.d/pgsql, just because
        /etc/rc.conf was already loaded.

        1. Set pgsql_home variable in /etc/rc.conf
        2. Restart OS or execute the following commands (as per /etc/rc):
                # . /etc/rc.subr
                # . /etc/rc.conf
                # _rc_conf_loaded=true
                # rc.d/pgsql start


        I'd suggest the following patch common for all
        postgresql8*-server packages:

---    9 Dec 2006 15:34:40 -0000
+++    22 May 2008 08:22:13 -0000
@@ -29,7 +29,7 @@
-eval pgsql_home="~$pgsql_user"
+eval pgsql_home=${pgsql_home:-"~$pgsql_user"}

Home | Main Index | Thread Index | Old Index