diff options
author | Simon Rettberg | 2020-08-03 18:04:59 +0200 |
---|---|---|
committer | Your Name | 2020-08-03 18:04:59 +0200 |
commit | a069ecafe76710cdc758f5c79a7c000bfe3a7e76 (patch) | |
tree | bc8de78515c7b5d0c24ffc3e7e216e5d846082bb /core/modules/dbus | |
parent | [rfs-stage31] Fix hostname lookup for newer busybox nslookup (diff) | |
download | mltk-a069ecafe76710cdc758f5c79a7c000bfe3a7e76.tar.gz mltk-a069ecafe76710cdc758f5c79a7c000bfe3a7e76.tar.xz mltk-a069ecafe76710cdc758f5c79a7c000bfe3a7e76.zip |
[systemd-distro] Get this module into working state, switch
Diffstat (limited to 'core/modules/dbus')
-rw-r--r-- | core/modules/dbus/module.build | 37 | ||||
-rw-r--r-- | core/modules/dbus/module.conf | 4 | ||||
-rw-r--r-- | core/modules/dbus/templates/dbus.service | 12 | ||||
-rw-r--r-- | core/modules/dbus/templates/dbus.socket | 5 |
4 files changed, 2 insertions, 56 deletions
diff --git a/core/modules/dbus/module.build b/core/modules/dbus/module.build index 3d18d90c..a001a2b8 100644 --- a/core/modules/dbus/module.build +++ b/core/modules/dbus/module.build @@ -25,43 +25,6 @@ build() { [Service] ExecStartPre=/${UUIDGEN#$MODULE_BUILD_DIR} --ensure EOF - - # First check if there is a system dbus file and copy it if so - declare -A found - for unit_type in service socket; do - for candidate in {,/usr}"/lib/systemd/system/dbus.${unit_type}"; do - if [ -e "$candidate" ]; then - cp -a "$candidate" "${MODULE_BUILD_DIR}/etc/systemd/system" \ - || perror "Failed to copy '$found' to '$MODULE_BUILD_DIR'." - found["$unit_type"]=oui - fi - done - done - - # If not found, generate service file from the template - if [ -z "${found["service"]}" ]; then - # This is ugly, as the command line arguments changed over time. Try to do the right thing (whatever that is) - # Find path for: dbus-daemon - local DAEMON=$(find "$MODULE_BUILD_DIR" -name dbus-daemon -executable | head -n 1) - [ -z "$DAEMON" ] && perror "Could not determine dbus-daemon location" - DAEMON="/${DAEMON#$MODULE_BUILD_DIR}" - - # Find path for: dbus-send - local SEND=$(find "$MODULE_BUILD_DIR" -name dbus-send -executable | head -n 1) - [ -z "$SEND" ] && perror "Could not determine dbus-send location" - SEND="/${SEND#$MODULE_BUILD_DIR}" - - # Fill in the template - sed "s,%DAEMON%,$DAEMON,g;s,%SEND%,$SEND,g" "${MODULE_DIR}/templates/dbus.service" \ - > "$MODULE_BUILD_DIR/etc/systemd/system/dbus.service" \ - || perror "Could not generate $MODULE_BUILD_DIR/etc/systemd/system/dbus.service" - fi - - # Same for socket file - if [ -z "${found["socket"]}" ]; then - cp "${MODULE_DIR}/templates/dbus.socket" "$MODULE_BUILD_DIR/etc/systemd/system" \ - || perror "Could not copy templates/dbus.socket to build dir." - fi } post_copy() { diff --git a/core/modules/dbus/module.conf b/core/modules/dbus/module.conf index de93374b..0ea5288f 100644 --- a/core/modules/dbus/module.conf +++ b/core/modules/dbus/module.conf @@ -12,7 +12,7 @@ REQUIRED_DIRECTORIES=" /etc/dbus-1 " REQUIRED_FILES=" - /etc/systemd/system/dbus.service - /etc/systemd/system/dbus.socket + /lib/systemd/system/dbus.service + /lib/systemd/system/dbus.socket " diff --git a/core/modules/dbus/templates/dbus.service b/core/modules/dbus/templates/dbus.service deleted file mode 100644 index ef9ee71d..00000000 --- a/core/modules/dbus/templates/dbus.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=D-Bus System Message Bus -Wants=dbus.socket -Requires=dbus.socket -After=syslog.target - -[Service] -ExecStartPre=-/opt/openslx/bin/rm -f /var/run/dbus/pid -ExecStart=%DAEMON% --system --address=systemd: --nofork -ExecReload=%SEND% --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig -OOMScoreAdjust=-900 - diff --git a/core/modules/dbus/templates/dbus.socket b/core/modules/dbus/templates/dbus.socket deleted file mode 100644 index 5c373cf4..00000000 --- a/core/modules/dbus/templates/dbus.socket +++ /dev/null @@ -1,5 +0,0 @@ -[Unit] -Description=D-Bus System Message Bus Socket - -[Socket] -ListenStream=/run/dbus/system_bus_socket |