summaryrefslogtreecommitdiff
path: root/man/tmpfiles.d.xml
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-07-12 23:51:15 +0200
committerLennart Poettering <lennart@poettering.net>2022-07-15 11:55:03 +0200
commit708daf42d8f8b930a468f3e384fe814af65c4e93 (patch)
tree65a11f1025f1109c73ae8b5cf8eaf7f71653da88 /man/tmpfiles.d.xml
parentb89cfe8a60825d7bd5d5a5de5f968c17ec79b357 (diff)
downloadsystemd-708daf42d8f8b930a468f3e384fe814af65c4e93.tar.gz
tmpfiles: optionally, decode string to write to files with base64
This is useful to use "f" or "w" to write arbitrary binary files to disk, or files with newlines and similar (for example to provision SSH host keys and similar).
Diffstat (limited to 'man/tmpfiles.d.xml')
-rw-r--r--man/tmpfiles.d.xml14
1 files changed, 11 insertions, 3 deletions
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
index 3267454f3b..79d0ff6bdd 100644
--- a/man/tmpfiles.d.xml
+++ b/man/tmpfiles.d.xml
@@ -160,8 +160,9 @@ L /tmp/foobar - - - - /dev/null</programlisting>
<refsect2>
<title>Type</title>
- <para>The type consists of a single letter and optionally an exclamation mark (<literal>!</literal>)
- minus sign (<literal>-</literal>), and/or equals sign (<literal>=</literal>).</para>
+ <para>The type consists of a single letter and optionally a plus sign (<literal>+</literal>),
+ exclamation mark (<literal>!</literal>), minus sign (<literal>-</literal>), equals sign
+ (<literal>=</literal>) and/or tilde character (<literal>~</literal>).</para>
<para>The following line types are understood:</para>
@@ -330,7 +331,7 @@ L /tmp/foobar - - - - /dev/null</programlisting>
exists and is not empty. Instead, the entire copy operation is
skipped. If the argument is omitted, files from the source directory
<filename>/usr/share/factory/</filename> with the same name
- are copied. Does not follow symlinks. Contents of the directories
+ are copied. Does not follow symlinks. Contents of the directories
are subject to time based cleanup if the age argument is specified.
</para></listitem>
</varlistentry>
@@ -489,6 +490,13 @@ w- /proc/sys/vm/swappiness - - - - 10</programlisting></para>
be either directories or directory symlinks). For example, if there is a FIFO in place of one of the parent path
components it will be replaced with a directory.</para>
+ <para>If the tilde character (<literal>~</literal>) is used, the argument (i.e. 6th) column is <ulink
+ url="https://www.rfc-editor.org/rfc/rfc4648.html">Base64 decoded</ulink> before use. This modifier is
+ only supported on line types that can write file contents, i.e. <varname>f</varname>,
+ <varname>f+</varname>, <varname>w</varname>. This is useful for writing arbitrary binary data
+ (including newlines and NUL bytes) to files. Note that if this switch is used, the argument is not
+ subject to specifier expansion, neither before nor after Base64 decoding.</para>
+
<para>Note that for all line types that result in creation of any kind of file node
(i.e. <varname>f</varname>/<varname>F</varname>,
<varname>d</varname>/<varname>D</varname>/<varname>v</varname>/<varname>q</varname>/<varname>Q</varname>,