diff --git a/databases/postgresql/Makefile b/databases/postgresql/Makefile index 455b4c59916..8151001de8d 100644 --- a/databases/postgresql/Makefile +++ b/databases/postgresql/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.135 2010/11/26 07:18:59 espie Exp $ +# $OpenBSD: Makefile,v 1.136 2010/12/13 16:14:38 ajacoutot Exp $ COMMENT-main= PostgreSQL RDBMS (client) COMMENT-server= PostgreSQL RDBMS (server) @@ -12,7 +12,7 @@ PKGNAME-server= postgresql-server-${VERSION} PKGNAME-docs= postgresql-docs-${VERSION} PKGNAME-contrib=postgresql-contrib-${VERSION} -REVISION-server= 0 +REVISION-server= 1 CATEGORIES= databases SHARED_LIBS= ecpg 7.2 \ diff --git a/databases/postgresql/pkg/postgresql.rc b/databases/postgresql/pkg/postgresql.rc index 485be07ec14..3d6dad730d6 100644 --- a/databases/postgresql/pkg/postgresql.rc +++ b/databases/postgresql/pkg/postgresql.rc @@ -1,21 +1,25 @@ #!/bin/sh # -# $OpenBSD: postgresql.rc,v 1.1 2010/11/08 14:12:24 pea Exp $ +# $OpenBSD: postgresql.rc,v 1.2 2010/12/13 16:14:38 ajacoutot Exp $ . /etc/rc.d/rc.subr daemon="${TRUEPREFIX}/bin/postgres" +daemon_user="_postgresql" + bin="${TRUEPREFIX}/bin/pg_ctl" datadir="/var/postgresql/data" rc_start() { - /usr/bin/su -l _postgresql -c \ + su -l -c ${_rcclass:-daemon} -s ${_rcshell:-/bin/sh} \ + ${_rcuser:-root} -c \ "${bin} -D ${datadir} start -l /var/postgresql/logfile" \ >/dev/null } rc_stop() { - /usr/bin/su -l _postgresql -c \ + su -l -c ${_rcclass:-daemon} -s ${_rcshell:-/bin/sh} \ + ${_rcuser:-root} -c \ "${bin} -D ${datadir} stop -m fast" >/dev/null && \ /bin/rm -f ${datadir}/postmaster.pid } diff --git a/net/vnstat/Makefile b/net/vnstat/Makefile index 058dd83d634..50f23559be3 100644 --- a/net/vnstat/Makefile +++ b/net/vnstat/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.3 2010/11/19 22:31:39 espie Exp $ +# $OpenBSD: Makefile,v 1.4 2010/12/13 16:14:38 ajacoutot Exp $ COMMENT = network traffic monitor DISTNAME = vnstat-1.10 CATEGORIES = net sysutils -REVISION = 0 +REVISION = 1 HOMEPAGE = http://humdi.net/vnstat/ diff --git a/net/vnstat/pkg/vnstatd.rc b/net/vnstat/pkg/vnstatd.rc index 3ec7ac0e89f..d56c1adb82e 100644 --- a/net/vnstat/pkg/vnstatd.rc +++ b/net/vnstat/pkg/vnstatd.rc @@ -1,18 +1,15 @@ #!/bin/sh # -# $OpenBSD: vnstatd.rc,v 1.1 2010/11/08 13:20:44 pea Exp $ +# $OpenBSD: vnstatd.rc,v 1.2 2010/12/13 16:14:38 ajacoutot Exp $ . /etc/rc.d/rc.subr daemon="${TRUEPREFIX}/sbin/vnstatd" daemon_flags="-d" +daemon_user="_vnstat" rc_pre() { /usr/bin/install -d -o _vnstat /var/run/vnstat } -rc_start() { - /usr/bin/su -l _vnstat -c "${daemon} ${daemon_flags}" > /dev/null -} - rc_cmd $1