ports/98580: a dbus rc script does not support a dynamic /var, specifically the creation of the /var/run/dbus directory.
srwadleigh
srw at udor.net
Tue Jun 6 07:35:18 UTC 2006
>Number: 98580
>Category: ports
>Synopsis: a dbus rc script does not support a dynamic /var, specifically the creation of the /var/run/dbus directory.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Jun 06 07:30:26 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: srwadleigh
>Release: FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
FreeBSD 6.1-STABLE FreeBSD 6.1-STABLE: Tue Jun 6 02:30:24 EDT 2006 i386
>Description:
dbus rc script does not support a dynamic /var, specifically the creation of the /var/run/dbus directory.
This results in dbus not starting if either /var or /var/run is mounted from an mfs volume where /var/run/dbus
created during port install is no longer present.
>How-To-Repeat:
/var/run/dbus directory is not recreated in the presence of a dynamic /var or /var/run, in my case when mounting
/var from mfs.
>Fix:
I altered the rc script to create and delete the /var/run/dbus directory on start and stop commands.
--- dbus.orig Tue Jun 6 03:09:32 2006
+++ dbus.new Tue Jun 6 03:09:32 2006
@@ -21,17 +21,17 @@
command="/usr/local/bin/dbus-daemon"
pidfile="/var/run/dbus/${name}.pid"
+start_precmd=${name}_prestart
stop_postcmd=stop_postcmd
-start_precmd()
+dbus_prestart()
{
- mkdir `dirname ${pidfile}` >/dev/null
- [ $? -eq 0 ] && chmod 751 ${pidfile}
+ mkdir `dirname ${pidfile}`
}
stop_postcmd()
{
- rm -f $pidfile
+ rm -rf `dirname ${pidfile}`
}
> cat dbus.diff
--- dbus.orig Tue Jun 6 03:09:32 2006
+++ dbus.new Tue Jun 6 03:09:32 2006
@@ -21,17 +21,17 @@
command="/usr/local/bin/dbus-daemon"
pidfile="/var/run/dbus/${name}.pid"
+start_precmd=${name}_prestart
stop_postcmd=stop_postcmd
-start_precmd()
+dbus_prestart()
{
- mkdir `dirname ${pidfile}` >/dev/null
- [ $? -eq 0 ] && chmod 751 ${pidfile}
+ mkdir `dirname ${pidfile}`
}
stop_postcmd()
{
- rm -f $pidfile
+ rm -rf `dirname ${pidfile}`
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list