5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved.
24 FMRI
=svc
:/system
/dbus
:default
26 .
/lib
/svc
/share
/smf_include.sh
28 if [ ! -x /usr
/libexec
/dbus-daemon
]; then
29 echo "/usr/libexec/dbus-daemon not found or not executable"
30 exit $SMF_EXIT_ERR_FATAL
33 # Generate machine-id regardless of zones
34 if [ ! -f /var
/lib
/dbus
/machine-id
]; then
35 /usr
/bin
/dbus-uuidgen
--ensure
38 if smf_is_nonglobalzone
; then
39 /usr
/sbin
/svcadm disable
-t svc
:/system
/dbus
40 echo "dbus-daemon cannot be run in non-global zones"
48 if [ ! -d /var
/run
/dbus
]; then
49 mkdir
-m 0755 /var
/run
/dbus
51 if [ -f /var
/run
/dbus
/pid
]; then
52 rm -f /var
/run
/dbus
/pid
55 (ulimit -S -n 8192 ; /usr
/libexec
/dbus-daemon
--system)
57 if [ $err -ne 0 ]; then
58 echo "dbus failed to start: error $err"
59 exit $SMF_EXIT_ERR_FATAL
64 echo "Usage: $0 { start }"
65 exit $SMF_EXIT_ERR_FATAL