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