xref: /netbsd-src/sbin/mount_puffs/mount_puffs.8 (revision 97151ea66584f9ab35c6cbedf1702b30d8d824a8)
1.\"	$NetBSD: mount_puffs.8,v 1.3 2016/11/24 12:38:32 wiz Exp $
2.\"
3.\" Copyright (c) 2010 Antti Kantee.  All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24.\" SUCH DAMAGE.
25.\"
26.Dd November 23, 2016
27.Dt MOUNT_PUFFS 8
28.Os
29.Sh NAME
30.Nm mount_puffs
31.Nd helper utility for mounting puffs/refuse file systems
32.Sh SYNOPSIS
33.Nm
34.Op Fl o Ar options
35.Ar program Ns Op # Ns Ar source
36.Ar mount_point
37.Sh DESCRIPTION
38The
39.Nm
40utility simply executes the given
41.Ar program ,
42allowing to mount
43.Xr puffs 4
44and
45.Xr refuse 3
46based file systems via
47.Ic mount -a
48or the
49.Xr fstab 5
50file.
51.Pp
52This command is usually only executed by
53.Xr mount 8 ,
54as users can directly execute file servers to mount them.
55The
56.Ar program
57parameter is either the path to the file server or the file name of
58it.
59In the latter case the
60.Ar program
61is searched in the
62.Ev PATH
63variable.
64The
65.Ar source
66parameter, when specified, will be passed to the
67.Ar program
68as its first non-option argument, with
69.Ar mount_point
70being the second one.
71.Pp
72The options are as follows:
73.Bl -tag -width Ds
74.It Fl o
75Options are specified with a
76.Fl o
77flag followed by a comma separated string of options.
78They are passed to the
79.Ar program
80without any modifications except for
81.Cm getargs ,
82which is typically used by
83.Ic mount -vv .
84When there is
85.Cm getargs
86in the list,
87.Nm
88discards all the other options and prints the kernel arguments for a
89.Xr puffs 4
90file system already mounted at
91.Ar mount_point .
92.El
93.Sh EXAMPLES
94Mount
95.Ic dmesgfs
96at
97.Pa /dmesg :
98.Dl # mount_puffs dmesgfs /dmesg
99.Pp
100Or in
101.Xr fstab 5 :
102.Bd -literal -offset indent -compact
103dmesgfs  /dmesg  puffs  rw
104.Ed
105.Pp
106These are equivalent to:
107.Dl # dmesgfs /dmesg
108.Pp
109Mount
110.Pa /usr/bin/rot13fs
111for
112.Pa /home/foo
113at
114.Pa /mnt/rot13
115with option
116.Fl o Cm rdonly :
117.Dl # mount_puffs -o rdonly /usr/bin/rot13fs#/home/foo /mnt/rot13
118.Pp
119Or in
120.Xr fstab 5 :
121.Bd -literal -offset indent -compact
122/usr/bin/rot13fs#/home/foo  /mnt/rot13  puffs  rdonly
123.Ed
124.Pp
125These are equivalent to:
126.Dl # /usr/bin/rot13fs -o rdonly /home/foo /mnt/rot13
127.Sh SEE ALSO
128.Xr refuse 3 ,
129.Xr puffs 4 ,
130.Xr fusermount 8 ,
131.Xr mount 8
132.Sh HISTORY
133The
134.Nm
135utility first appeared in
136.Nx 6.0 .
137