ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
9fc0f6
From a3794196f13a2fd47d61517a304c15e162a6c06a Mon Sep 17 00:00:00 2001
9fc0f6
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
9fc0f6
Date: Thu, 7 Nov 2013 23:57:19 -0500
9fc0f6
Subject: [PATCH] man,units: fix installation of systemd-nspawn@.service and
9fc0f6
 add example
9fc0f6
9fc0f6
---
9fc0f6
 TODO                             |  1 +
9fc0f6
 man/systemd-nspawn.xml           | 12 ++++++++++++
9fc0f6
 units/systemd-nspawn@.service.in |  2 +-
9fc0f6
 3 files changed, 14 insertions(+), 1 deletion(-)
9fc0f6
9fc0f6
diff --git a/TODO b/TODO
9fc0f6
index 07269f4..ad4b733 100644
9fc0f6
--- a/TODO
9fc0f6
+++ b/TODO
9fc0f6
@@ -493,6 +493,7 @@ Features:
9fc0f6
   - nspawn: maybe add a way to drop additional caps, in addition to add additional caps
9fc0f6
   - nspawn: maybe explicitly reset loginuid?
9fc0f6
   - nspawn: make it work for dwalsh and shared /usr containers -- tmpfs mounts as command line parameters, selinux exec context
9fc0f6
+  - refuses to boot containers without /etc/machine-id (OK?), and with empty /etc/machine-id (not OK).
9fc0f6
 
9fc0f6
 * cryptsetup:
9fc0f6
   - cryptsetup-generator: allow specification of passwords in crypttab itself
9fc0f6
diff --git a/man/systemd-nspawn.xml b/man/systemd-nspawn.xml
9fc0f6
index 7d450f9..ba9e516 100644
9fc0f6
--- a/man/systemd-nspawn.xml
9fc0f6
+++ b/man/systemd-nspawn.xml
9fc0f6
@@ -428,6 +428,18 @@
9fc0f6
         </refsect1>
9fc0f6
 
9fc0f6
         <refsect1>
9fc0f6
+                <title>Example 4</title>
9fc0f6
+
9fc0f6
+                <programlisting># mv ~/arch-tree /var/lib/container/arch
9fc0f6
+# systemctl enable systemd-nspawn@arch.service
9fc0f6
+# systemctl start systemd-nspawn@arch.service</programlisting>
9fc0f6
+
9fc0f6
+                <para>This makes the Arch Linux container part of the
9fc0f6
+                <filename>multi-user.target</filename> on the host.
9fc0f6
+                </para>
9fc0f6
+        </refsect1>
9fc0f6
+
9fc0f6
+        <refsect1>
9fc0f6
                 <title>Exit status</title>
9fc0f6
 
9fc0f6
                 <para>The exit code of the program executed in the
9fc0f6
diff --git a/units/systemd-nspawn@.service.in b/units/systemd-nspawn@.service.in
9fc0f6
index eca62e3..8e00736 100644
9fc0f6
--- a/units/systemd-nspawn@.service.in
9fc0f6
+++ b/units/systemd-nspawn@.service.in
9fc0f6
@@ -14,4 +14,4 @@ ExecStart=@bindir@/systemd-nspawn -bjD /var/lib/container/%i
9fc0f6
 Type=notify
9fc0f6
 
9fc0f6
 [Install]
9fc0f6
-Also=multi-user.target
9fc0f6
+WantedBy=multi-user.target