| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# |
|
2
|
|
|
|
|
|
|
# This file is part of Config-Model |
|
3
|
|
|
|
|
|
|
# |
|
4
|
|
|
|
|
|
|
# This software is Copyright (c) 2005-2022 by Dominique Dumont. |
|
5
|
|
|
|
|
|
|
# |
|
6
|
|
|
|
|
|
|
# This is free software, licensed under: |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# The GNU Lesser General Public License, Version 2.1, February 1999 |
|
9
|
|
|
|
|
|
|
# |
|
10
|
1
|
|
|
1
|
|
343
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
27
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
288
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
return [ |
|
14
|
|
|
|
|
|
|
{ |
|
15
|
|
|
|
|
|
|
'author' => [ |
|
16
|
|
|
|
|
|
|
'Dominique Dumont' |
|
17
|
|
|
|
|
|
|
], |
|
18
|
|
|
|
|
|
|
'class_description' => 'data of one /etc/fstab line', |
|
19
|
|
|
|
|
|
|
'copyright' => [ |
|
20
|
|
|
|
|
|
|
'2010,2011 Dominique Dumont' |
|
21
|
|
|
|
|
|
|
], |
|
22
|
|
|
|
|
|
|
'element' => [ |
|
23
|
|
|
|
|
|
|
'fs_spec', |
|
24
|
|
|
|
|
|
|
{ |
|
25
|
|
|
|
|
|
|
'description' => 'block special device or remote filesystem to be mounted', |
|
26
|
|
|
|
|
|
|
'mandatory' => 1, |
|
27
|
|
|
|
|
|
|
'type' => 'leaf', |
|
28
|
|
|
|
|
|
|
'value_type' => 'uniline', |
|
29
|
|
|
|
|
|
|
'warp' => { |
|
30
|
|
|
|
|
|
|
'follow' => { |
|
31
|
|
|
|
|
|
|
'f1' => '- fs_vfstype' |
|
32
|
|
|
|
|
|
|
}, |
|
33
|
|
|
|
|
|
|
'rules' => [ |
|
34
|
|
|
|
|
|
|
'$f1 eq \'proc\'', |
|
35
|
|
|
|
|
|
|
{ |
|
36
|
|
|
|
|
|
|
'default' => 'proc' |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
] |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
}, |
|
41
|
|
|
|
|
|
|
'fs_file', |
|
42
|
|
|
|
|
|
|
{ |
|
43
|
|
|
|
|
|
|
'description' => 'mount point for the filesystem', |
|
44
|
|
|
|
|
|
|
'mandatory' => 1, |
|
45
|
|
|
|
|
|
|
'type' => 'leaf', |
|
46
|
|
|
|
|
|
|
'value_type' => 'uniline', |
|
47
|
|
|
|
|
|
|
'warp' => { |
|
48
|
|
|
|
|
|
|
'follow' => { |
|
49
|
|
|
|
|
|
|
'f1' => '- fs_vfstype' |
|
50
|
|
|
|
|
|
|
}, |
|
51
|
|
|
|
|
|
|
'rules' => [ |
|
52
|
|
|
|
|
|
|
'$f1 eq \'proc\'', |
|
53
|
|
|
|
|
|
|
{ |
|
54
|
|
|
|
|
|
|
'default' => '/proc' |
|
55
|
|
|
|
|
|
|
}, |
|
56
|
|
|
|
|
|
|
'$f1 eq \'swap\'', |
|
57
|
|
|
|
|
|
|
{ |
|
58
|
|
|
|
|
|
|
'default' => 'none' |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
] |
|
61
|
|
|
|
|
|
|
} |
|
62
|
|
|
|
|
|
|
}, |
|
63
|
|
|
|
|
|
|
'fs_vfstype', |
|
64
|
|
|
|
|
|
|
{ |
|
65
|
|
|
|
|
|
|
'choice' => [ |
|
66
|
|
|
|
|
|
|
'auto', |
|
67
|
|
|
|
|
|
|
'davfs', |
|
68
|
|
|
|
|
|
|
'ext2', |
|
69
|
|
|
|
|
|
|
'ext3', |
|
70
|
|
|
|
|
|
|
'ext4', |
|
71
|
|
|
|
|
|
|
'swap', |
|
72
|
|
|
|
|
|
|
'proc', |
|
73
|
|
|
|
|
|
|
'iso9660', |
|
74
|
|
|
|
|
|
|
'vfat', |
|
75
|
|
|
|
|
|
|
'usbfs', |
|
76
|
|
|
|
|
|
|
'ignore', |
|
77
|
|
|
|
|
|
|
'nfs', |
|
78
|
|
|
|
|
|
|
'nfs4', |
|
79
|
|
|
|
|
|
|
'none', |
|
80
|
|
|
|
|
|
|
'ignore', |
|
81
|
|
|
|
|
|
|
'debugfs' |
|
82
|
|
|
|
|
|
|
], |
|
83
|
|
|
|
|
|
|
'description' => 'file system type', |
|
84
|
|
|
|
|
|
|
'help' => { |
|
85
|
|
|
|
|
|
|
'auto' => 'file system type is probed by the kernel when mounting the device', |
|
86
|
|
|
|
|
|
|
'davfs' => 'WebDav access', |
|
87
|
|
|
|
|
|
|
'ext2' => 'Common Linux file system.', |
|
88
|
|
|
|
|
|
|
'ext3' => 'Common Linux file system with journaling ', |
|
89
|
|
|
|
|
|
|
'ignore' => 'unused disk partition', |
|
90
|
|
|
|
|
|
|
'iso9660' => 'CD-ROM or DVD file system', |
|
91
|
|
|
|
|
|
|
'proc' => 'Kernel info through a special file system', |
|
92
|
|
|
|
|
|
|
'usbfs' => 'USB pseudo file system. Gives a file system view of kernel data related to usb', |
|
93
|
|
|
|
|
|
|
'vfat' => 'Older Windows file system often used on removable media' |
|
94
|
|
|
|
|
|
|
}, |
|
95
|
|
|
|
|
|
|
'mandatory' => 1, |
|
96
|
|
|
|
|
|
|
'type' => 'leaf', |
|
97
|
|
|
|
|
|
|
'value_type' => 'enum' |
|
98
|
|
|
|
|
|
|
}, |
|
99
|
|
|
|
|
|
|
'fs_mntopts', |
|
100
|
|
|
|
|
|
|
{ |
|
101
|
|
|
|
|
|
|
'description' => 'mount options associated with the filesystem', |
|
102
|
|
|
|
|
|
|
'type' => 'warped_node', |
|
103
|
|
|
|
|
|
|
'warp' => { |
|
104
|
|
|
|
|
|
|
'follow' => { |
|
105
|
|
|
|
|
|
|
'f1' => '- fs_vfstype' |
|
106
|
|
|
|
|
|
|
}, |
|
107
|
|
|
|
|
|
|
'rules' => [ |
|
108
|
|
|
|
|
|
|
'$f1 eq \'proc\'', |
|
109
|
|
|
|
|
|
|
{ |
|
110
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::CommonOptions' |
|
111
|
|
|
|
|
|
|
}, |
|
112
|
|
|
|
|
|
|
'$f1 eq \'auto\'', |
|
113
|
|
|
|
|
|
|
{ |
|
114
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::CommonOptions' |
|
115
|
|
|
|
|
|
|
}, |
|
116
|
|
|
|
|
|
|
'$f1 eq \'vfat\'', |
|
117
|
|
|
|
|
|
|
{ |
|
118
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::CommonOptions' |
|
119
|
|
|
|
|
|
|
}, |
|
120
|
|
|
|
|
|
|
'$f1 eq \'swap\'', |
|
121
|
|
|
|
|
|
|
{ |
|
122
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::SwapOptions' |
|
123
|
|
|
|
|
|
|
}, |
|
124
|
|
|
|
|
|
|
'$f1 eq \'ext2\'', |
|
125
|
|
|
|
|
|
|
{ |
|
126
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::Ext2FsOpt' |
|
127
|
|
|
|
|
|
|
}, |
|
128
|
|
|
|
|
|
|
'$f1 eq \'ext3\'', |
|
129
|
|
|
|
|
|
|
{ |
|
130
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::Ext3FsOpt' |
|
131
|
|
|
|
|
|
|
}, |
|
132
|
|
|
|
|
|
|
'$f1 eq \'ext4\'', |
|
133
|
|
|
|
|
|
|
{ |
|
134
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::Ext4FsOpt' |
|
135
|
|
|
|
|
|
|
}, |
|
136
|
|
|
|
|
|
|
'$f1 eq \'usbfs\'', |
|
137
|
|
|
|
|
|
|
{ |
|
138
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::UsbFsOptions' |
|
139
|
|
|
|
|
|
|
}, |
|
140
|
|
|
|
|
|
|
'$f1 eq \'davfs\'', |
|
141
|
|
|
|
|
|
|
{ |
|
142
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::CommonOptions' |
|
143
|
|
|
|
|
|
|
}, |
|
144
|
|
|
|
|
|
|
'$f1 eq \'iso9660\'', |
|
145
|
|
|
|
|
|
|
{ |
|
146
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::Iso9660_Opt' |
|
147
|
|
|
|
|
|
|
}, |
|
148
|
|
|
|
|
|
|
'$f1 eq \'nfs\'', |
|
149
|
|
|
|
|
|
|
{ |
|
150
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::CommonOptions' |
|
151
|
|
|
|
|
|
|
}, |
|
152
|
|
|
|
|
|
|
'$f1 eq \'nfs4\'', |
|
153
|
|
|
|
|
|
|
{ |
|
154
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::CommonOptions' |
|
155
|
|
|
|
|
|
|
}, |
|
156
|
|
|
|
|
|
|
'$f1 eq \'none\'', |
|
157
|
|
|
|
|
|
|
{ |
|
158
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::NoneOptions' |
|
159
|
|
|
|
|
|
|
}, |
|
160
|
|
|
|
|
|
|
'$f1 eq \'debugfs\'', |
|
161
|
|
|
|
|
|
|
{ |
|
162
|
|
|
|
|
|
|
'config_class_name' => 'Fstab::CommonOptions' |
|
163
|
|
|
|
|
|
|
} |
|
164
|
|
|
|
|
|
|
] |
|
165
|
|
|
|
|
|
|
} |
|
166
|
|
|
|
|
|
|
}, |
|
167
|
|
|
|
|
|
|
'fs_freq', |
|
168
|
|
|
|
|
|
|
{ |
|
169
|
|
|
|
|
|
|
'choice' => [ |
|
170
|
|
|
|
|
|
|
'0', |
|
171
|
|
|
|
|
|
|
'1' |
|
172
|
|
|
|
|
|
|
], |
|
173
|
|
|
|
|
|
|
'default' => '0', |
|
174
|
|
|
|
|
|
|
'description' => 'Specifies if the file system needs to be dumped', |
|
175
|
|
|
|
|
|
|
'type' => 'leaf', |
|
176
|
|
|
|
|
|
|
'value_type' => 'enum', |
|
177
|
|
|
|
|
|
|
'warp' => { |
|
178
|
|
|
|
|
|
|
'follow' => { |
|
179
|
|
|
|
|
|
|
'fstyp' => '- fs_vfstype', |
|
180
|
|
|
|
|
|
|
'isbound' => '- fs_mntopts bind' |
|
181
|
|
|
|
|
|
|
}, |
|
182
|
|
|
|
|
|
|
'rules' => [ |
|
183
|
|
|
|
|
|
|
'$fstyp eq "none" and $isbound', |
|
184
|
|
|
|
|
|
|
{ |
|
185
|
|
|
|
|
|
|
'choice' => [ |
|
186
|
|
|
|
|
|
|
'0' |
|
187
|
|
|
|
|
|
|
] |
|
188
|
|
|
|
|
|
|
} |
|
189
|
|
|
|
|
|
|
] |
|
190
|
|
|
|
|
|
|
} |
|
191
|
|
|
|
|
|
|
}, |
|
192
|
|
|
|
|
|
|
'fs_passno', |
|
193
|
|
|
|
|
|
|
{ |
|
194
|
|
|
|
|
|
|
'default' => 0, |
|
195
|
|
|
|
|
|
|
'description' => 'used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time', |
|
196
|
|
|
|
|
|
|
'summary' => 'fsck pass number', |
|
197
|
|
|
|
|
|
|
'type' => 'leaf', |
|
198
|
|
|
|
|
|
|
'value_type' => 'integer', |
|
199
|
|
|
|
|
|
|
'warp' => { |
|
200
|
|
|
|
|
|
|
'follow' => { |
|
201
|
|
|
|
|
|
|
'fstyp' => '- fs_vfstype', |
|
202
|
|
|
|
|
|
|
'isbound' => '- fs_mntopts bind' |
|
203
|
|
|
|
|
|
|
}, |
|
204
|
|
|
|
|
|
|
'rules' => [ |
|
205
|
|
|
|
|
|
|
'$fstyp eq "none" and $isbound', |
|
206
|
|
|
|
|
|
|
{ |
|
207
|
|
|
|
|
|
|
'max' => '0' |
|
208
|
|
|
|
|
|
|
} |
|
209
|
|
|
|
|
|
|
] |
|
210
|
|
|
|
|
|
|
} |
|
211
|
|
|
|
|
|
|
} |
|
212
|
|
|
|
|
|
|
], |
|
213
|
|
|
|
|
|
|
'gist' => '{fs_vfstype}: {fs_file}', |
|
214
|
|
|
|
|
|
|
'license' => 'LGPL2', |
|
215
|
|
|
|
|
|
|
'name' => 'Fstab::FsLine' |
|
216
|
|
|
|
|
|
|
} |
|
217
|
|
|
|
|
|
|
] |
|
218
|
|
|
|
|
|
|
; |
|
219
|
|
|
|
|
|
|
|