blob: 09cadc8aa25eafc2903cec2d1a0773ac2aa9da31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>mount-binfmt_misc service</title>
<meta name="Description" content="System oneshot service to populate the binfmt_misc filesystem." />
<meta name="Keywords" content="goetia s6-rc Linux bin system supervision tree" />
</head>
<header>
<p>
<a href="//0x53.net/software/goetia/goetia-linux">goetia-linux</a>
<br />
<a href="//0x53.net/software/goetia">goetia</a>
<br />
<a href="//0x53.net/software">Software</a>
<br />
<a href="//0x53.net">0x53.net</a>
</p>
</header>
<body>
<h1>The mount-binfmt_misc service</h1>
<p>
mount-binfmt_misc is a
<a href="https://skarnet.org/software/s6-rc/s6-rc-compile.html#source">oneshot service</a>
set up the
<a href="https://docs.kernel.org/admin-guide/binfmt-misc.html">binfmt_misc</a>
virtual filesystem.
</p>
<p>
When it is started:
</p>
<ul>
<li>
It mounts the binfmt_misc virtual filesystem at
<code>/proc/sys/fs/binfmt_misc</code>.
</li>
<li>
It reads all files at
<code>/etc/binfmt.d/*</code>
</li>
<li>
For each line in each file it finds there,
ignoring empty lines and lines starting with a
<code>#</code>,
it tries to apply the line
as a registration string as defined
<a href="https://docs.kernel.org/admin-guide/binfmt-misc.html">here</a>
under the following conditions:
</li>
<ul>
<li>
Files are ordered by
<a href="https://skarnet.org/software/execline/elglob.html">elglob</a>.
</li>
<li>
If <code>name</code> fields are duplicated,
the last one processed will be applied.
</li>
</ul>
</ul>
<p>
When it is stopped:
</p>
<ul>
<li>
It umounts <code>/proc/sys/fs/binfmt_misc</code>.
</li>
</ul>
<section id="examples">
<h2>Examples</h2>
<p>
A file <code>/etc/binfmt.d/wine.conf</code>
with the content <code>:DOSWin:M::MZ::/bin/wine:</code>
would make windows binaries be executed
using wine automatically.
</p>
</section>
</body>
</html>
|