From 69669521453d299ff2a3d02ab9ac00a247bd47e5 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 18 Sep 2013 15:05:07 +0200 Subject: [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. --- remote/modules/dbus/data/etc/systemd/system/dbus.socket | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 remote/modules/dbus/data/etc/systemd/system/dbus.socket (limited to 'remote/modules/dbus/data') diff --git a/remote/modules/dbus/data/etc/systemd/system/dbus.socket b/remote/modules/dbus/data/etc/systemd/system/dbus.socket new file mode 100644 index 00000000..5c373cf4 --- /dev/null +++ b/remote/modules/dbus/data/etc/systemd/system/dbus.socket @@ -0,0 +1,5 @@ +[Unit] +Description=D-Bus System Message Bus Socket + +[Socket] +ListenStream=/run/dbus/system_bus_socket -- cgit v1.2.3-55-g7522 From 4052504dc902765d109c34bff0db73a69a12b428 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 18 Sep 2013 15:14:12 +0200 Subject: [dbus] Missed *.wants --- .../dbus/data/etc/systemd/system/multi-user.target.wants/dbus.service | 1 + .../dbus/data/etc/systemd/system/sockets.target.wants/dbus.socket | 1 + remote/modules/dbus/dbus.build | 2 +- remote/modules/dbus/templates/dbus.service | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) create mode 120000 remote/modules/dbus/data/etc/systemd/system/multi-user.target.wants/dbus.service create mode 120000 remote/modules/dbus/data/etc/systemd/system/sockets.target.wants/dbus.socket (limited to 'remote/modules/dbus/data') diff --git a/remote/modules/dbus/data/etc/systemd/system/multi-user.target.wants/dbus.service b/remote/modules/dbus/data/etc/systemd/system/multi-user.target.wants/dbus.service new file mode 120000 index 00000000..224df24b --- /dev/null +++ b/remote/modules/dbus/data/etc/systemd/system/multi-user.target.wants/dbus.service @@ -0,0 +1 @@ +../dbus.service \ No newline at end of file diff --git a/remote/modules/dbus/data/etc/systemd/system/sockets.target.wants/dbus.socket b/remote/modules/dbus/data/etc/systemd/system/sockets.target.wants/dbus.socket new file mode 120000 index 00000000..fe02d162 --- /dev/null +++ b/remote/modules/dbus/data/etc/systemd/system/sockets.target.wants/dbus.socket @@ -0,0 +1 @@ +../dbus.socket \ No newline at end of file diff --git a/remote/modules/dbus/dbus.build b/remote/modules/dbus/dbus.build index beb557b4..7b7e472c 100644 --- a/remote/modules/dbus/dbus.build +++ b/remote/modules/dbus/dbus.build @@ -22,7 +22,7 @@ build() { [ -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" \ + 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" } diff --git a/remote/modules/dbus/templates/dbus.service b/remote/modules/dbus/templates/dbus.service index b6e05271..a49d8f0f 100644 --- a/remote/modules/dbus/templates/dbus.service +++ b/remote/modules/dbus/templates/dbus.service @@ -1,5 +1,6 @@ [Unit] Description=D-Bus System Message Bus +Wants=dbus.socket Requires=dbus.socket After=syslog.target -- cgit v1.2.3-55-g7522