Make use of rcexec.

While here, force postgresql to quit in rc_stop, ok pea@
This commit is contained in:
ajacoutot 2011-01-05 16:05:54 +00:00
parent 78d4c46ce3
commit ae70c849c2
12 changed files with 28 additions and 35 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.185 2011/01/04 16:03:00 ajacoutot Exp $ # $OpenBSD: Makefile,v 1.186 2011/01/05 16:05:54 ajacoutot Exp $
SHARED_ONLY= Yes SHARED_ONLY= Yes
@ -15,7 +15,7 @@ CATEGORIES= databases
V= MySQL-5.1 V= MySQL-5.1
MASTER_SITES= ${MASTER_SITE_MYSQL:=Downloads/$V/} MASTER_SITES= ${MASTER_SITE_MYSQL:=Downloads/$V/}
REVISION-server=1 REVISION-server=2
SHARED_LIBS= mysqlclient_r 20.0 \ SHARED_LIBS= mysqlclient_r 20.0 \
mysqlclient 20.0 mysqlclient 20.0

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: mysqld.rc,v 1.9 2010/12/27 14:50:22 ajacoutot Exp $ # $OpenBSD: mysqld.rc,v 1.10 2011/01/05 16:05:54 ajacoutot Exp $
daemon="${TRUEPREFIX}/bin/mysqld_safe" daemon="${TRUEPREFIX}/bin/mysqld_safe"
@ -13,8 +13,7 @@ rc_check() {
} }
rc_start() { rc_start() {
su -l -c ${daemon_class} -s ${daemon_shell} ${daemon_user} \ ${rcexec} -c "${daemon} ${daemon_flags}" >/dev/null 2>&1 &
-c "${daemon} ${daemon_flags}" >/dev/null 2>&1 &
} }
rc_stop() { rc_stop() {

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.142 2011/01/04 16:03:00 ajacoutot Exp $ # $OpenBSD: Makefile,v 1.143 2011/01/05 16:05:54 ajacoutot Exp $
COMMENT-main= PostgreSQL RDBMS (client) COMMENT-main= PostgreSQL RDBMS (client)
COMMENT-server= PostgreSQL RDBMS (server) COMMENT-server= PostgreSQL RDBMS (server)
@ -12,7 +12,7 @@ PKGNAME-server= postgresql-server-${VERSION}
PKGNAME-docs= postgresql-docs-${VERSION} PKGNAME-docs= postgresql-docs-${VERSION}
PKGNAME-contrib=postgresql-contrib-${VERSION} PKGNAME-contrib=postgresql-contrib-${VERSION}
REVISION-server=2 REVISION-server=3
REVISION-contrib=0 REVISION-contrib=0
CATEGORIES= databases CATEGORIES= databases

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: postgresql.rc,v 1.5 2010/12/27 14:50:22 ajacoutot Exp $ # $OpenBSD: postgresql.rc,v 1.6 2011/01/05 16:05:54 ajacoutot Exp $
daemon="${TRUEPREFIX}/bin/postgres" daemon="${TRUEPREFIX}/bin/postgres"
daemon_user="_postgresql" daemon_user="_postgresql"
@ -12,13 +12,13 @@ datadir="/var/postgresql/data"
rc_start() { rc_start() {
rm -f ${datadir}/postmaster.pid rm -f ${datadir}/postmaster.pid
su -l -c ${daemon_class} -s ${daemon_shell} ${daemon_user} \ ${rcexec} "${bin} -D ${datadir} start -l /var/postgresql/logfile" \
-c "${bin} -D ${datadir} start -l /var/postgresql/logfile" >/dev/null >/dev/null
} }
rc_stop() { rc_stop() {
su -l -c ${daemon_class} -s ${daemon_shell} ${daemon_user} \ ${rcexec} "${bin} -D ${datadir} stop -m fast" >/dev/null || \
-c "${bin} -D ${datadir} stop -m fast" >/dev/null ${rcexec} "${bin} -D ${datadir} stop -m immediate" >/dev/null
} }
rc_cmd $1 rc_cmd $1

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.64 2010/12/27 14:50:23 ajacoutot Exp $ # $OpenBSD: Makefile,v 1.65 2011/01/05 16:05:54 ajacoutot Exp $
COMMENT= mailing list manager with web interface COMMENT= mailing list manager with web interface
DISTNAME= mailman-2.1.14 DISTNAME= mailman-2.1.14
REVISION= 7 REVISION= 8
CATEGORIES= mail www CATEGORIES= mail www
HOMEPAGE= http://www.gnu.org/software/mailman/ HOMEPAGE= http://www.gnu.org/software/mailman/

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: mailman.rc,v 1.7 2010/12/27 14:50:23 ajacoutot Exp $ # $OpenBSD: mailman.rc,v 1.8 2011/01/05 16:05:54 ajacoutot Exp $
daemon="${TRUEPREFIX}/lib/mailman/bin/mailmanctl" daemon="${TRUEPREFIX}/lib/mailman/bin/mailmanctl"
daemon_flags="-s -q" daemon_flags="-s -q"
@ -10,8 +10,7 @@ daemon_flags="-s -q"
rc_reload=NO rc_reload=NO
rc_start() { rc_start() {
su -l -c ${daemon_class} -s ${daemon_shell} ${daemon_user} \ ${rcexec} "${daemon} ${daemon_flags} start"
-c "${daemon} ${daemon_flags} start"
} }
rc_stop() { rc_stop() {

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.8 2010/12/30 08:33:24 jasper Exp $ # $OpenBSD: Makefile,v 1.9 2011/01/05 16:05:54 ajacoutot Exp $
COMMENT-main= high performance webserver written in Erlang, libraries COMMENT-main= high performance webserver written in Erlang, libraries
COMMENT-web= high performance webserver written in Erlang, docroot COMMENT-web= high performance webserver written in Erlang, docroot
@ -6,7 +6,7 @@ COMMENT-web= high performance webserver written in Erlang, docroot
VERSION= 1.89 VERSION= 1.89
DISTNAME= yaws-${VERSION} DISTNAME= yaws-${VERSION}
PKGNAME-main= yaws-${VERSION} PKGNAME-main= yaws-${VERSION}
REVISION-main= 3 REVISION-main= 4
PKGNAME-web= yaws-web-${VERSION} PKGNAME-web= yaws-web-${VERSION}
REVISION-web= 0 REVISION-web= 0
CATEGORIES= www CATEGORIES= www

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: yaws.rc,v 1.2 2010/12/29 10:15:13 ajacoutot Exp $ # $OpenBSD: yaws.rc,v 1.3 2011/01/05 16:05:54 ajacoutot Exp $
daemon="${TRUEPREFIX}/bin/yaws" daemon="${TRUEPREFIX}/bin/yaws"
daemon_flags="--daemon --conf ${SYSCONFDIR}/yaws/yaws.conf" daemon_flags="--daemon --conf ${SYSCONFDIR}/yaws/yaws.conf"
@ -10,13 +10,11 @@ daemon_flags="--daemon --conf ${SYSCONFDIR}/yaws/yaws.conf"
pexp="${LOCALBASE}/lib/erlang/erts.*${TRUEPREFIX}/lib/yaws/ebin -run yaws" pexp="${LOCALBASE}/lib/erlang/erts.*${TRUEPREFIX}/lib/yaws/ebin -run yaws"
rc_stop() { rc_stop() {
su -l -c ${daemon_class} -s ${daemon_shell} ${daemon_user} \ ${rcexec} "${daemon} --stop" >/dev/null
-c "${daemon} --stop" >/dev/null
} }
rc_reload() { rc_reload() {
su -l -c ${daemon_class} -s ${daemon_shell} ${daemon_user} \ ${rcexec} "${daemon} --hup" >/dev/null
-c "${daemon} --hup" >/dev/null
} }
rc_cmd $1 rc_cmd $1

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.97 2010/12/27 14:50:24 ajacoutot Exp $ # $OpenBSD: Makefile,v 1.98 2011/01/05 16:05:54 ajacoutot Exp $
SHARED_ONLY= Yes SHARED_ONLY= Yes
@ -7,7 +7,7 @@ COMMENT= GNOME display manager
GNOME_PROJECT= gdm GNOME_PROJECT= gdm
GNOME_VERSION= 2.20.11 GNOME_VERSION= 2.20.11
REVISION= 17 REVISION= 18
HOMEPAGE= http://projects.gnome.org/gdm/ HOMEPAGE= http://projects.gnome.org/gdm/

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: gdm.rc,v 1.9 2010/12/27 14:50:24 ajacoutot Exp $ # $OpenBSD: gdm.rc,v 1.10 2011/01/05 16:05:54 ajacoutot Exp $
daemon="${TRUEPREFIX}/sbin/gdm" daemon="${TRUEPREFIX}/sbin/gdm"
@ -10,8 +10,7 @@ pexp="${TRUEPREFIX}/sbin/gdm-binary"
rc_reload=NO rc_reload=NO
rc_start() { rc_start() {
(sleep 5; su -l -c ${daemon_class} -s ${daemon_shell} ${daemon_user} \ (sleep 5; ${rcexec} "${daemon} ${daemon_flags}" >/dev/null)&
-c "${daemon} ${daemon_flags}" >/dev/null)&
} }
rc_cmd $1 rc_cmd $1

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.28 2010/12/27 14:50:24 ajacoutot Exp $ # $OpenBSD: Makefile,v 1.29 2011/01/05 16:05:54 ajacoutot Exp $
COMMENT = VNC server for real X displays COMMENT = VNC server for real X displays
DISTNAME = x11vnc-0.9.12 DISTNAME = x11vnc-0.9.12
REVISION = 4 REVISION = 5
CATEGORIES = x11 CATEGORIES = x11
HOMEPAGE = http://www.karlrunge.com/x11vnc/ HOMEPAGE = http://www.karlrunge.com/x11vnc/

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $OpenBSD: x11vnc.rc,v 1.5 2010/12/27 14:50:24 ajacoutot Exp $ # $OpenBSD: x11vnc.rc,v 1.6 2011/01/05 16:05:54 ajacoutot Exp $
daemon="${TRUEPREFIX}/bin/x11vnc" daemon="${TRUEPREFIX}/bin/x11vnc"
daemon_flags="-localhost -logfile /var/log/x11vnc -ncache 0 -display :0 -forever -loop100 -auth /etc/X11/xdm/authdir/authfiles/A:0-*" daemon_flags="-localhost -logfile /var/log/x11vnc -ncache 0 -display :0 -forever -loop100 -auth /etc/X11/xdm/authdir/authfiles/A:0-*"
@ -10,9 +10,7 @@ daemon_flags="-localhost -logfile /var/log/x11vnc -ncache 0 -display :0 -forever
rc_reload=NO rc_reload=NO
rc_start() { rc_start() {
type rc_pre >/dev/null && rc_pre ${rcexec} "${daemon} ${daemon_flags}" >/dev/null 2>&1 &
su -l -c ${daemon_class} -s ${daemon_shell} ${daemon_user} \
-c "${daemon} ${daemon_flags}" >/dev/null 2>&1 &
} }
rc_cmd $1 rc_cmd $1