mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-09 08:28:02 +02:00
Merge branch 'openrc' into 'main'
meson: added support OpenRC init system See merge request dbus/dbus!549
This commit is contained in:
commit
e124c32180
5 changed files with 76 additions and 0 deletions
|
|
@ -84,6 +84,21 @@ if use_systemd
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if use_openrc
|
||||||
|
configure_file(
|
||||||
|
input: 'openrc/dbus.init.in',
|
||||||
|
output: 'dbus',
|
||||||
|
configuration: data_config,
|
||||||
|
install_dir: openrc_init_dir,
|
||||||
|
)
|
||||||
|
configure_file(
|
||||||
|
input: 'openrc/dbus.conf.in',
|
||||||
|
output: 'dbus.conf',
|
||||||
|
configuration: data_config,
|
||||||
|
install_dir: openrc_conf_dir,
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
subdir('legacy-config')
|
subdir('legacy-config')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
21
bus/openrc/dbus.conf.in
Normal file
21
bus/openrc/dbus.conf.in
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# This file is part of the D-Bus library.
|
||||||
|
#
|
||||||
|
# The D-Bus library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 2 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# The D-Bus library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with the D-Bus library; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
# Start the D-Bus daemon
|
||||||
|
DBUS_DAEMON_ENABLE="yes"
|
||||||
|
|
||||||
|
# Arguments to pass to the D-Bus daemon
|
||||||
|
DBUS_DAEMON_ARGS="--system"
|
||||||
26
bus/openrc/dbus.init.in
Normal file
26
bus/openrc/dbus.init.in
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
description="D-Bus System Message Bus"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need localmount
|
||||||
|
after bootmisc
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ebegin "Starting D-Bus System Message Bus"
|
||||||
|
start-stop-daemon --start --quiet --pidfile /run/dbus/pid --exec @EXPANDED_BINDIR@/dbus-daemon -- --system
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping D-Bus System Message Bus"
|
||||||
|
start-stop-daemon --stop --quiet --pidfile /run/dbus/pid
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
ebegin "Reloading D-Bus System Message Bus"
|
||||||
|
@EXPANDED_BINDIR@/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
@ -554,6 +554,12 @@ else
|
||||||
endif
|
endif
|
||||||
data_config.set('SYSTEMCTL', systemctl)
|
data_config.set('SYSTEMCTL', systemctl)
|
||||||
|
|
||||||
|
use_openrc = get_option('openrc').enabled()
|
||||||
|
if use_openrc
|
||||||
|
openrc_init_dir = get_option('sysconfdir') / 'init.d'
|
||||||
|
openrc_conf_dir = get_option('sysconfdir') / 'conf.d'
|
||||||
|
endif
|
||||||
|
|
||||||
elogind_opt = get_option('elogind')
|
elogind_opt = get_option('elogind')
|
||||||
if use_systemd
|
if use_systemd
|
||||||
if elogind_opt.enabled()
|
if elogind_opt.enabled()
|
||||||
|
|
@ -1432,6 +1438,7 @@ summary_dict += {
|
||||||
'Building inotify support': use_inotify,
|
'Building inotify support': use_inotify,
|
||||||
'Building kqueue support': use_kqueue,
|
'Building kqueue support': use_kqueue,
|
||||||
'Building systemd support': use_systemd,
|
'Building systemd support': use_systemd,
|
||||||
|
'Building OpenRC support': use_openrc,
|
||||||
'Building elogind support': use_elogind,
|
'Building elogind support': use_elogind,
|
||||||
'Traditional activation': use_traditional_activation,
|
'Traditional activation': use_traditional_activation,
|
||||||
'Building X11 code': config.get('DBUS_BUILD_X11'),
|
'Building X11 code': config.get('DBUS_BUILD_X11'),
|
||||||
|
|
|
||||||
|
|
@ -251,6 +251,13 @@ option(
|
||||||
description: 'Systemd at_console support'
|
description: 'Systemd at_console support'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
option(
|
||||||
|
'openrc',
|
||||||
|
type: 'feature',
|
||||||
|
value: 'auto',
|
||||||
|
description: 'OpenRC init script support'
|
||||||
|
)
|
||||||
|
|
||||||
option(
|
option(
|
||||||
'test_socket_dir',
|
'test_socket_dir',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue