diff options
| author | Simon Rettberg | 2013-09-18 15:05:07 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2013-09-30 13:26:31 +0200 |
| commit | af77b6c2c1430f00850cb15ed0eda0a0fb41e1df (patch) | |
| tree | ecd9f2adf4756b6ee7ae557f568d2399b7794f45 /remote/modules/dbus/dbus.build | |
| parent | [polkit] polkit.build: +missing directory for opensuse (diff) | |
| download | tm-scripts-af77b6c2c1430f00850cb15ed0eda0a0fb41e1df.tar.gz tm-scripts-af77b6c2c1430f00850cb15ed0eda0a0fb41e1df.tar.xz tm-scripts-af77b6c2c1430f00850cb15ed0eda0a0fb41e1df.zip | |
[dbus] Create systemd service using a template instead of grabbing from running system
Also remove the ugly hack that moves /lib/systemd to /etc/systemd; this would only help
mixing systemd service files from the running system with our own -- trouble ahead!
Warn if /lib/systemd exists in the target build dir.
Diffstat (limited to 'remote/modules/dbus/dbus.build')
| -rw-r--r-- | remote/modules/dbus/dbus.build | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/remote/modules/dbus/dbus.build b/remote/modules/dbus/dbus.build index bcab63b0..81c849fb 100644 --- a/remote/modules/dbus/dbus.build +++ b/remote/modules/dbus/dbus.build @@ -7,11 +7,26 @@ fetch_source() { build() { COPYLIST="list_dpkg_output" [ -e "${COPYLIST}" ] && rm "${COPYLIST}" - - list_packet_files >> "${COPYLIST}" + + list_packet_files >> "${COPYLIST}" tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}" - + + # Generate systemd files + mkdir "$MODULE_BUILD_DIR/etc/systemd/system" + local UUIDGEN=$(find "$MODULE_BUILD_DIR" -name dbus-uuidgen -executable | head -n 1) + local DAEMON=$(find "$MODULE_BUILD_DIR" -name dbus-daemon -executable | head -n 1) + local SEND=$(find "$MODULE_BUILD_DIR" -name dbus-send -executable | head -n 1) + UUIDGEN="${UUIDGEN#$MODULE_BUILD_DIR}" + DAEMON="${DAEMON#$MODULE_BUILD_DIR}" + SEND="${SEND#$MODULE_BUILD_DIR}" + [ -z "$UUIDGEN" ] && perror "Could not determine dbus-uuidgen location" + [ -z "$DAEMON" ] && perror "Could not determine dbus-daemon location" + [ -z "$SEND" ] && perror "Could not determine dbus-send location" + sed "s,%UUIDGEN%,/$UUIDGEN,g;s,%DAEMON%,$DAEMON,g;s,%SEND%,$SEND,g" "templates/dbus.service" \ + > "$MODULE_BUILD_DIR/etc/systemd/system/dbus.service" \ + || perror "Could not generate $MODULE_BUILD_DIR/etc/systemd/system/dbus.service" } post_copy() { : } + |
