diff options
author | jmmv <jmmv@pkgsrc.org> | 2004-10-12 08:15:35 +0000 |
---|---|---|
committer | jmmv <jmmv@pkgsrc.org> | 2004-10-12 08:15:35 +0000 |
commit | af506b861daee1c7a60c1ff9242a216979172443 (patch) | |
tree | 1c4e3838dcd05009ea8e3761e5c32a2fad9d48d5 /sysutils/dbus | |
parent | 4f98d2e3e924cc50f88226ff89be8c4b3bca3337 (diff) | |
download | pkgsrc-af506b861daee1c7a60c1ff9242a216979172443.tar.gz |
Recreate the VARBASE/run/dbus directory before starting the daemon, in case
it does not exist; this directory is removed at boot time by another script.
Also, don't bother to create it with an OWN_DIRS_PERMS line, because the
rc.d script will do it for us.
Bump PKGREVISION to 1.
Diffstat (limited to 'sysutils/dbus')
-rw-r--r-- | sysutils/dbus/Makefile | 5 | ||||
-rw-r--r-- | sysutils/dbus/files/dbus.sh | 12 |
2 files changed, 13 insertions, 4 deletions
diff --git a/sysutils/dbus/Makefile b/sysutils/dbus/Makefile index 5f78c07ff45..c792b7a4574 100644 --- a/sysutils/dbus/Makefile +++ b/sysutils/dbus/Makefile @@ -1,14 +1,15 @@ -# $NetBSD: Makefile,v 1.1.1.1 2004/10/11 17:45:26 jmmv Exp $ +# $NetBSD: Makefile,v 1.2 2004/10/12 08:15:35 jmmv Exp $ # .include "Makefile.common" +PKGREVISION= 1 + PKG_USERS= messagebus:messagebus::System\\ message\\ bus:${VARBASE}/run/dbus:/sbin/nologin PKG_GROUPS= messagebus MAKE_DIRS= ${PKG_SYSCONFDIR}/event.d MAKE_DIRS+= ${PKG_SYSCONFDIR}/system.d -OWN_DIRS_PERMS= ${VARBASE}/run/dbus messagebus messagebus 0755 RCD_SCRIPTS= dbus diff --git a/sysutils/dbus/files/dbus.sh b/sysutils/dbus/files/dbus.sh index d40d8ea9d5a..fd03828e166 100644 --- a/sysutils/dbus/files/dbus.sh +++ b/sysutils/dbus/files/dbus.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: dbus.sh,v 1.1.1.1 2004/10/11 17:45:27 jmmv Exp $ +# $NetBSD: dbus.sh,v 1.2 2004/10/12 08:15:35 jmmv Exp $ # # PROVIDE: dbus # REQUIRE: DAEMON @@ -12,10 +12,18 @@ name="dbus" rcvar=$name command="@PREFIX@/bin/dbus-daemon-1" command_args="--system" -required_dirs="@VARBASE@/run/dbus" pidfile="@VARBASE@/run/dbus/pid" +start_precmd=dbus_prestart dbus_user=messagebus dbus_group=messagebus +dbus_prestart() { + if @TEST@ ! -d "@VARBASE@/run/dbus"; then + @MKDIR@ "@VARBASE@/run/dbus" + @CHMOD@ 0755 "@VARBASE@/run/dbus" + @CHOWN@ ${dbus_user}:${dbus_group} "@VARBASE@/run/dbus" + fi +} + load_rc_config $name run_rc_command "$1" |