summaryrefslogtreecommitdiff
path: root/man/systemctl.xml
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2021-01-21 18:37:40 +0000
committerLuca Boccassi <luca.boccassi@microsoft.com>2021-01-21 19:08:40 +0000
commit6faecbd353f9eb5aebe65a7159c5e61191e4330f (patch)
tree45b4cce2df2a31ae703806afcf0404e0669de676 /man/systemctl.xml
parentaf477139522060f6165221597ce6509dbde91791 (diff)
downloadsystemd-6faecbd353f9eb5aebe65a7159c5e61191e4330f.tar.gz
systemctl: add new option to mount image inside a running service namespace
Use the new DBUS method and follow the same pattern as the systemctl bind command.
Diffstat (limited to 'man/systemctl.xml')
-rw-r--r--man/systemctl.xml18
1 files changed, 18 insertions, 0 deletions
diff --git a/man/systemctl.xml b/man/systemctl.xml
index 6177d1a0dd..f316fb5eb8 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -568,6 +568,24 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
</varlistentry>
<varlistentry>
+ <term><command>mount-image</command> <replaceable>UNIT</replaceable> <replaceable>IMAGE</replaceable> [<replaceable>PATH</replaceable> [<replaceable>PARTITION_NAME</replaceable>:<replaceable>MOUNT_OPTIONS</replaceable>]]</term>
+
+ <listitem><para>Mounts an image from the host into the specified unit's view. The first path argument is the source
+ image on the host, the second path argument is the destination directory in the unit's view (ie: inside
+ <option>RootImage=</option>/<option>RootDirectory=</option>). Any following argument is interpreted as a
+ colon-separated tuple of partition name and comma-separated list of mount options for that partition. The format is the
+ same as the service <option>MountImages=</option> setting. When combined with the <option>--read-only</option> switch, a
+ ready-only mount is created. When combined with the <option>--mkdir</option> switch, the destination path is first
+ created before the mount is applied. Note that this option is currently only supported for units that run within a mount
+ namespace (e.g.: with <option>RootImage=</option>, <option>PrivateMounts=</option>, etc.).
+ Note that the namespace mentioned here, where the image mount will be added to, is the one where the main service
+ process runs, as other processes run in distinct namespaces (e.g.: <option>ExecReload=</option>,
+ <option>ExecStartPre=</option>, etc.). Example:
+ <programlisting>systemctl mount-image foo.service /tmp/img.raw /var/lib/image root:ro,nosuid</programlisting>
+ <programlisting>systemctl mount-image --mkdir bar.service /tmp/img.raw /var/lib/baz/img</programlisting></para></listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><command>service-log-level</command> <replaceable>SERVICE</replaceable> [<replaceable>LEVEL</replaceable>]</term>
<listitem><para>If the <replaceable>LEVEL</replaceable> argument is not given, print the current