summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-22 03:57:15 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-22 04:02:07 +0100
commit3d7415f43f0fe6a821d7bc4a341ba371e8a30ef3 (patch)
treed79e54dec69645a894a4ec12d6abf765515d245f /units
parentf4c135bf2f0abcf79c89efbeae51f03bacba5f2f (diff)
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.
Diffstat (limited to 'units')
-rw-r--r--units/.gitignore1
-rw-r--r--units/org.freedesktop.import1.busname14
-rw-r--r--units/systemd-importd.service.in19
3 files changed, 34 insertions, 0 deletions
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