ports/151331: net port: devel/dbus fix startup on diskless systems

Zane C.B. vvelox at vvelox.net
Sat Oct 9 07:20:01 UTC 2010


>Number:         151331
>Category:       ports
>Synopsis:       net port: devel/dbus    fix startup on diskless systems
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 09 07:20:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Zane C.B.
>Release:        FreeBSD 8.1-PRERELEASE amd64
>Organization:
>Environment:


System: FreeBSD 8.1-PRERELEASE #1: Thu Jul 22 22:15:08 UTC 2010
    kitsunetemp at vixen42.vulpes.vvelox.net:/usr/obj/usr/src/sys/GENERIC



>Description:


Booting a FreeBSD diskless system will mount "/var/" as a memory disk with little included in it. So for dbus, the required directories need recreated. This patch checks for it and does so if needed.


>How-To-Repeat:


1: PXE boot a FreeBSD install
2: run "/usr/local/etc/rc.d/dbus start"
3: watch any thing dbus related error as "/var/db/dbus/machine-id" does not exist
4: apply patch and restart it
5: enjoy


>Fix:


--- devel_dbus_files_dbus.in.diff begins here ---
--- dbus.in.orig	2010-05-12 10:15:01.000000000 -0500
+++ dbus.in	2010-10-09 01:29:10.013733485 -0500
@@ -27,6 +27,13 @@
 
 dbus_prestart()
 {
+    if [ ! -d /var/db/dbus ]; then
+	mkdir /var/db/dbus
+    fi
+    if [ ! -f /var/db/dbus/machine-id ]; then
+	dbus-uuidgen > /var/db/dbus/machine-id
+    fi
+
     mkdir -p $(dirname $pidfile)
 }
 
--- devel_dbus_files_dbus.in.diff ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list