Import of pkgsrc-2015Q1

This commit is contained in:
2015-04-22 14:34:26 +02:00
committed by Lionel Sambuc
parent 9a8c06dafb
commit 4af1cdf7a9
25114 changed files with 870550 additions and 795435 deletions

35
sysutils/dbus/files/smf/dbus.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/sbin/sh
. /lib/svc/share/smf_include.sh
# SMF_FMRI is the name of the target service. This allows multiple instances
# to use the same script.
if [ ! -x @PREFIX@/bin/dbus-daemon ]; then
echo "@PREFIX@/bin/dbus-daemon not found or not executable"
exit $SMF_EXIT_ERR_FATAL
fi
if [ ! -f @VARBASE@/db/dbus/machine-id ]; then
@PREFIX@/bin/dbus-uuidgen --ensure
fi
case "$1" in
'start')
if [ -f @VARBASE@/run/dbus/pid ]; then
rm -f @VARBASE@/run/dbus/pid
fi
@PREFIX@/bin/dbus-daemon --system
err=$?
if [ $err -ne 0 ]; then
echo "dbus failed to start: error $err"
exit $SMF_EXIT_ERR_FATAL
fi
;;
*)
echo "Usage: $0 { start }"
exit $SMF_EXIT_ERR_FATAL
;;
esac
exit $SMF_EXIT_OK

View File

@@ -0,0 +1,47 @@
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='@SMF_NAME@'>
<service
name='@SMF_PREFIX@/@SMF_NAME@'
type='service'
version='1'>
<create_default_instance enabled='false' />
<single_instance />
<dependency name='usr'
type='service'
grouping='require_all'
restart_on='none'>
<service_fmri value='svc:/system/filesystem/minimal' />
</dependency>
<exec_method
type='method'
name='start'
exec='@PREFIX@/@SMF_METHOD_FILE.dbus@ start'
timeout_seconds='30'>
<method_context>
<method_credential user='@DBUS_USER@' group='@DBUS_GROUP@' />
</method_context>
</exec_method>
<exec_method
type='method'
name='stop'
exec=':kill'
timeout_seconds='30' />
<property_group name='startd' type='framework'>
<!-- sub-process core dumps shouldn't restart session -->
<propval name='ignore_error' type='astring'
value='core,signal' />
</property_group>
<stability value='Unstable' />
<template>
<common_name>
<loctext xml:lang='C'>
D-BUS message bus
</loctext>
</common_name>
<documentation>
<manpage title='dbus-daemon' section='1' />
</documentation>
</template>
</service>
</service_bundle>