From 3d7415f43f0fe6a821d7bc4a341ba371e8a30ef3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 22 Jan 2015 03:57:15 +0100 Subject: import: introduce new mini-daemon systemd-importd, and make machinectl a client to it The old "systemd-import" binary is now an internal tool. We still use it as asynchronous backend for systemd-importd. Since the import tool might require some IO and CPU resources (due to qcow2 explosion, and decompression), and because we might want to run it with more minimal priviliges we still keep it around as the worker binary to execute as child process of importd. machinectl now has verbs for pulling down images, cancelling them and listing them. --- units/.gitignore | 1 + units/org.freedesktop.import1.busname | 14 ++++++++++++++ units/systemd-importd.service.in | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 units/org.freedesktop.import1.busname create mode 100644 units/systemd-importd.service.in (limited to 'units') diff --git a/units/.gitignore b/units/.gitignore index 541d7bec7..6fdb629c3 100644 --- a/units/.gitignore +++ b/units/.gitignore @@ -33,6 +33,7 @@ /systemd-hibernate.service /systemd-hostnamed.service /systemd-hybrid-sleep.service +/systemd-importd.service /systemd-initctl.service /systemd-journal-catalog-update.service /systemd-journal-flush.service diff --git a/units/org.freedesktop.import1.busname b/units/org.freedesktop.import1.busname new file mode 100644 index 000000000..ca6dcef98 --- /dev/null +++ b/units/org.freedesktop.import1.busname @@ -0,0 +1,14 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Virtual Machine and Container Download Service Bus Name +Documentation=man:systemd-importd.service(8) + +[BusName] +Service=systemd-importd.service +AllowWorld=talk diff --git a/units/systemd-importd.service.in b/units/systemd-importd.service.in new file mode 100644 index 000000000..b9cb97e6b --- /dev/null +++ b/units/systemd-importd.service.in @@ -0,0 +1,19 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Virtual Machine and Container Download Service +Documentation=man:systemd-importd.service(8) + +[Service] +ExecStart=@rootlibexecdir@/systemd-importd +BusName=org.freedesktop.import1 +WatchdogSec=1min +PrivateTmp=yes +PrivateDevices=yes +ProtectSystem=full +ProtectHome=yes -- cgit v1.2.3