diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-10-23 06:05:46 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-10-23 06:05:46 +0000 |
commit | edb17cf415fac5f70e00dd86802adb49d1e5ca06 (patch) | |
tree | 709d4514416d43495f09be659f4fa0fd8e1ecdab | |
parent | 09db9410aa882e4d981272e409fb23ce8d1ced16 (diff) | |
download | mdevd-edb17cf415fac5f70e00dd86802adb49d1e5ca06.tar.xz |
Add examples
-rw-r--r-- | doc/mdevd.html | 5 | ||||
-rw-r--r-- | examples/s6-rc/mdevd-netlink/dependencies | 1 | ||||
-rw-r--r-- | examples/s6-rc/mdevd-netlink/notification-fd | 1 | ||||
-rw-r--r-- | examples/s6-rc/mdevd-netlink/pipeline-name | 1 | ||||
-rw-r--r-- | examples/s6-rc/mdevd-netlink/producer-for | 1 | ||||
-rw-r--r-- | examples/s6-rc/mdevd-netlink/run | 3 | ||||
-rw-r--r-- | examples/s6-rc/mdevd-netlink/type | 1 | ||||
-rw-r--r-- | examples/s6-rc/mdevd/consumer-for | 1 | ||||
-rw-r--r-- | examples/s6-rc/mdevd/dependencies | 1 | ||||
-rw-r--r-- | examples/s6-rc/mdevd/run | 1 | ||||
-rw-r--r-- | examples/s6-rc/mdevd/type | 1 | ||||
-rw-r--r-- | examples/s6-rc/mount-sys/dependencies | 1 | ||||
-rw-r--r-- | examples/s6-rc/mount-sys/down | 2 | ||||
-rw-r--r-- | examples/s6-rc/mount-sys/type | 1 | ||||
-rw-r--r-- | examples/s6-rc/mount-sys/up | 1 | ||||
-rwxr-xr-x | examples/s6/mdevd/log/run | 2 | ||||
-rw-r--r-- | examples/s6/mdevd/notification-fd | 1 | ||||
-rwxr-xr-x | examples/s6/mdevd/run | 3 |
18 files changed, 27 insertions, 1 deletions
diff --git a/doc/mdevd.html b/doc/mdevd.html index 3b21565..3e8d594 100644 --- a/doc/mdevd.html +++ b/doc/mdevd.html @@ -64,8 +64,9 @@ coldplug uevents. </li> <h2> Exit codes </h2> <ul> - <li> 0: EOF read on mdevd's stdin </li> + <li> 0: EOF read on standard input </li> <li> 1: received an invalid event </li> + <li> 2: syntax error in the configuration file </li> <li> 100: wrong usage </li> <li> 111: system call failed </li> </ul> @@ -128,6 +129,8 @@ That allows it to work as a coldplug manager when paired with it acts as a daemon, because mdev-netlink normally never exits until the end of the machine lifetime and never closes its stdout, so mdevd's stdin never receives EOF. </li> + <li> The <tt>examples/</tt> subdirectory of the mdevd package contains +examples on how to run mdevd under various init systems / supervisors. </li> </ul> </body> diff --git a/examples/s6-rc/mdevd-netlink/dependencies b/examples/s6-rc/mdevd-netlink/dependencies new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/examples/s6-rc/mdevd-netlink/dependencies @@ -0,0 +1 @@ + diff --git a/examples/s6-rc/mdevd-netlink/notification-fd b/examples/s6-rc/mdevd-netlink/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/examples/s6-rc/mdevd-netlink/notification-fd @@ -0,0 +1 @@ +3 diff --git a/examples/s6-rc/mdevd-netlink/pipeline-name b/examples/s6-rc/mdevd-netlink/pipeline-name new file mode 100644 index 0000000..0d284a9 --- /dev/null +++ b/examples/s6-rc/mdevd-netlink/pipeline-name @@ -0,0 +1 @@ +mdevd-pipeline diff --git a/examples/s6-rc/mdevd-netlink/producer-for b/examples/s6-rc/mdevd-netlink/producer-for new file mode 100644 index 0000000..3252ded --- /dev/null +++ b/examples/s6-rc/mdevd-netlink/producer-for @@ -0,0 +1 @@ +mdevd diff --git a/examples/s6-rc/mdevd-netlink/run b/examples/s6-rc/mdevd-netlink/run new file mode 100644 index 0000000..c2a7b18 --- /dev/null +++ b/examples/s6-rc/mdevd-netlink/run @@ -0,0 +1,3 @@ +#!/bin/execlineb -P +exec -c +mdevd-netlink -d 3 diff --git a/examples/s6-rc/mdevd-netlink/type b/examples/s6-rc/mdevd-netlink/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/examples/s6-rc/mdevd-netlink/type @@ -0,0 +1 @@ +longrun diff --git a/examples/s6-rc/mdevd/consumer-for b/examples/s6-rc/mdevd/consumer-for new file mode 100644 index 0000000..ca025df --- /dev/null +++ b/examples/s6-rc/mdevd/consumer-for @@ -0,0 +1 @@ +mdevd-netlink diff --git a/examples/s6-rc/mdevd/dependencies b/examples/s6-rc/mdevd/dependencies new file mode 100644 index 0000000..11299c3 --- /dev/null +++ b/examples/s6-rc/mdevd/dependencies @@ -0,0 +1 @@ +mount-sys diff --git a/examples/s6-rc/mdevd/run b/examples/s6-rc/mdevd/run new file mode 100644 index 0000000..3252ded --- /dev/null +++ b/examples/s6-rc/mdevd/run @@ -0,0 +1 @@ +mdevd diff --git a/examples/s6-rc/mdevd/type b/examples/s6-rc/mdevd/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/examples/s6-rc/mdevd/type @@ -0,0 +1 @@ +longrun diff --git a/examples/s6-rc/mount-sys/dependencies b/examples/s6-rc/mount-sys/dependencies new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/examples/s6-rc/mount-sys/dependencies @@ -0,0 +1 @@ + diff --git a/examples/s6-rc/mount-sys/down b/examples/s6-rc/mount-sys/down new file mode 100644 index 0000000..9d665e7 --- /dev/null +++ b/examples/s6-rc/mount-sys/down @@ -0,0 +1,2 @@ +foreground { s6-umount /sys } +exit 0 diff --git a/examples/s6-rc/mount-sys/type b/examples/s6-rc/mount-sys/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/examples/s6-rc/mount-sys/type @@ -0,0 +1 @@ +oneshot diff --git a/examples/s6-rc/mount-sys/up b/examples/s6-rc/mount-sys/up new file mode 100644 index 0000000..780be7b --- /dev/null +++ b/examples/s6-rc/mount-sys/up @@ -0,0 +1 @@ +s6-mount -wt sysfs sys /sys diff --git a/examples/s6/mdevd/log/run b/examples/s6/mdevd/log/run new file mode 100755 index 0000000..f3d5913 --- /dev/null +++ b/examples/s6/mdevd/log/run @@ -0,0 +1,2 @@ +#!/bin/execlineb -P +mdevd diff --git a/examples/s6/mdevd/notification-fd b/examples/s6/mdevd/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/examples/s6/mdevd/notification-fd @@ -0,0 +1 @@ +3 diff --git a/examples/s6/mdevd/run b/examples/s6/mdevd/run new file mode 100755 index 0000000..c2a7b18 --- /dev/null +++ b/examples/s6/mdevd/run @@ -0,0 +1,3 @@ +#!/bin/execlineb -P +exec -c +mdevd-netlink -d 3 |