Install the unique machine identifier file under /etc/machine-id and add

a /var/db/dbus/machine-id symlink pointing to it. /etc/machine-id is the
"new" path to store this data nowadays.
This commit is contained in:
ajacoutot 2013-01-01 14:36:11 +00:00
parent 8895044843
commit 3aa1667a56
3 changed files with 12 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.94 2012/12/23 12:25:31 sthen Exp $
# $OpenBSD: Makefile,v 1.95 2013/01/01 14:36:11 ajacoutot Exp $
# DPB: not parallel-safe
@ -6,7 +6,7 @@ COMMENT= message bus system
DISTNAME= dbus-1.6.8
EPOCH= 0
REVISION= 3
REVISION= 4
SHARED_LIBS += dbus-1 10.2 # 10.2
@ -25,7 +25,7 @@ PERMIT_PACKAGE_FTP= Yes
WANTLIB += ICE SM X11 c expat kvm pthread xcb
MASTER_SITES= ${HOMEPAGE}/releases/dbus/
MASTER_SITES= ${HOMEPAGE}releases/dbus/
USE_GMAKE= Yes
USE_LIBTOOL= Yes

View File

@ -1,7 +1,8 @@
@comment $OpenBSD: PLIST,v 1.16 2012/11/09 16:05:13 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.17 2013/01/01 14:36:11 ajacoutot Exp $
@newgroup _dbus:572
@newuser _dbus:572:_dbus:daemon:dbus user:/nonexistent:/sbin/nologin
@extra /var/db/dbus/machine-id
@extra ${SYSCONFDIR}/machine-id
%%SHARED%%
@bin bin/dbus-cleanup-sockets
@bin bin/dbus-daemon
@ -72,5 +73,5 @@ share/examples/dbus/dbus-1/system.conf
share/examples/dbus/dbus-1/system.d/
@sample ${SYSCONFDIR}/dbus-1/system.d/
@sample /var/db/dbus/
@exec ${PREFIX}/bin/dbus-uuidgen --ensure
@exec ${PREFIX}/bin/dbus-uuidgen --ensure=${SYSCONFDIR}/machine-id
@rcscript ${RCDIR}/dbus_daemon

View File

@ -1,12 +1,17 @@
#!/bin/sh
#
# $OpenBSD: dbus_daemon.rc,v 1.10 2011/12/20 14:27:46 ajacoutot Exp $
# $OpenBSD: dbus_daemon.rc,v 1.11 2013/01/01 14:36:11 ajacoutot Exp $
daemon="${TRUEPREFIX}/bin/dbus-daemon --system"
. /etc/rc.d/rc.subr
rc_pre() {
# XXX remove after OPENBSD_5_4 is branched
[ -f /var/db/dbus/machine-id -a ! -h /var/db/dbus/machine-id ] && \
mv /var/db/dbus/machine-id ${SYSCONFDIR}/machine-id
[ ! -h /var/db/dbus/machine-id ] && \
ln -sf ${SYSCONFDIR}/machine-id /var/db/dbus/machine-id
rm -f /var/run/dbus/pid
install -d -o _dbus -g _dbus /var/run/dbus
}