]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: provide an example how to plug systemd-mount into udev
authorLennart Poettering <lennart@poettering.net>
Thu, 14 Mar 2019 09:12:36 +0000 (10:12 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Mar 2019 10:03:42 +0000 (11:03 +0100)
Prompted by: #11982

man/systemd-mount.xml

index 610c97f9488721754cc7724d3d4d79237757a60e..5a13c98a6db5935c263e5d3f4278ec3d6618f620 100644 (file)
     </variablelist>
   </refsect1>
 
+  <refsect1>
+    <title>Example</title>
+
+    <para>Use a udev rule like the following to automatically mount all USB storage plugged in:</para>
+
+    <programlisting>ACTION=="add", SUBSYSTEMS=="usb", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", \
+        RUN{program}+="/usr/bin/systemd-mount --no-block --automount=yes --collect $devnode"</programlisting>
+  </refsect1>
+
   <refsect1>
     <title>See Also</title>
     <para>