Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  6 Jun 2006 03:22:36 -0400 (EDT)
From:      srwadleigh <srw@udor.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        srw@udor.net
Subject:   ports/98580: a     dbus rc script does not support a dynamic /var, specifically the creation of the /var/run/dbus directory.
Message-ID:  <20060606072236.295C24112@mail.mad.udor.net>
Resent-Message-ID: <200606060730.k567UQBO099902@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060606072236.295C24112>