blib/lib/Config/Model/models/Fstab/FsLine.pl

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Config/Model/models/Fstab/Ext4FsOpt.pl ↑ Summary blib/lib/Config/Model/models/Fstab/NoneOptions.pl »
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 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 return [
16 {
17 1 'author' => [
18 'Dominique Dumont'
19 ],
20 'class_description' => 'data of one /etc/fstab line',
21 'copyright' => [
22 '2010,2011 Dominique Dumont'
23 ],
24 'element' => [
25 'fs_spec',
26 {
27 'description' => 'block special device or remote filesystem to be mounted',
28 'mandatory' => 1,
29 'type' => 'leaf',
30 'value_type' => 'uniline',
31 'warp' => {
32 'follow' => {
33 'f1' => '- fs_vfstype'
34 },
35 'rules' => [
36 {
37 'apply' => {
38 'default' => 'proc'
39 },
40 'when' => '$f1 eq \'proc\''
41 }
42 ]
43 }
44 },
45 'fs_file',
46 {
47 'description' => 'mount point for the filesystem',
48 'mandatory' => 1,
49 'type' => 'leaf',
50 'value_type' => 'uniline',
51 'warp' => {
52 'follow' => {
53 'f1' => '- fs_vfstype'
54 },
55 'rules' => [
56 {
57 'apply' => {
58 'default' => '/proc'
59 },
60 'when' => '$f1 eq \'proc\''
61 },
62 {
63 'apply' => {
64 'default' => 'none'
65 },
66 'when' => '$f1 eq \'swap\''
67 }
68 ]
69 }
70 },
71 'fs_vfstype',
72 {
73 'choice' => [
74 'auto',
75 'davfs',
76 'ext2',
77 'ext3',
78 'ext4',
79 'swap',
80 'proc',
81 'iso9660',
82 'vfat',
83 'usbfs',
84 'ignore',
85 'nfs',
86 'nfs4',
87 'none',
88 'ignore',
89 'debugfs'
90 ],
91 'description' => 'file system type',
92 'help' => {
93 'auto' => 'file system type is probed by the kernel when mounting the device',
94 'davfs' => 'WebDav access',
95 'ext2' => 'Common Linux file system.',
96 'ext3' => 'Common Linux file system with journaling ',
97 'ignore' => 'unused disk partition',
98 'iso9660' => 'CD-ROM or DVD file system',
99 'proc' => 'Kernel info through a special file system',
100 'usbfs' => 'USB pseudo file system. Gives a file system view of kernel data related to usb',
101 'vfat' => 'Older Windows file system often used on removable media'
102 },
103 'mandatory' => 1,
104 'type' => 'leaf',
105 'value_type' => 'enum'
106 },
107 'fs_mntopts',
108 {
109 'description' => 'mount options associated with the filesystem',
110 'type' => 'warped_node',
111 'warp' => {
112 'follow' => {
113 'f1' => '- fs_vfstype'
114 },
115 'rules' => [
116 {
117 'apply' => {
118 'config_class_name' => 'Fstab::CommonOptions'
119 },
120 'when' => '$f1 eq \'proc\''
121 },
122 {
123 'apply' => {
124 'config_class_name' => 'Fstab::CommonOptions'
125 },
126 'when' => '$f1 eq \'auto\''
127 },
128 {
129 'apply' => {
130 'config_class_name' => 'Fstab::VfatOpt'
131 },
132 'when' => '$f1 eq \'vfat\''
133 },
134 {
135 'apply' => {
136 'config_class_name' => 'Fstab::SwapOptions'
137 },
138 'when' => '$f1 eq \'swap\''
139 },
140 {
141 'apply' => {
142 'config_class_name' => 'Fstab::Ext2FsOpt'
143 },
144 'when' => '$f1 eq \'ext2\''
145 },
146 {
147 'apply' => {
148 'config_class_name' => 'Fstab::Ext3FsOpt'
149 },
150 'when' => '$f1 eq \'ext3\''
151 },
152 {
153 'apply' => {
154 'config_class_name' => 'Fstab::Ext4FsOpt'
155 },
156 'when' => '$f1 eq \'ext4\''
157 },
158 {
159 'apply' => {
160 'config_class_name' => 'Fstab::UsbFsOptions'
161 },
162 'when' => '$f1 eq \'usbfs\''
163 },
164 {
165 'apply' => {
166 'config_class_name' => 'Fstab::CommonOptions'
167 },
168 'when' => '$f1 eq \'davfs\''
169 },
170 {
171 'apply' => {
172 'config_class_name' => 'Fstab::Iso9660_Opt'
173 },
174 'when' => '$f1 eq \'iso9660\''
175 },
176 {
177 'apply' => {
178 'config_class_name' => 'Fstab::CommonOptions'
179 },
180 'when' => '$f1 eq \'nfs\''
181 },
182 {
183 'apply' => {
184 'config_class_name' => 'Fstab::CommonOptions'
185 },
186 'when' => '$f1 eq \'nfs4\''
187 },
188 {
189 'apply' => {
190 'config_class_name' => 'Fstab::NoneOptions'
191 },
192 'when' => '$f1 eq \'none\''
193 },
194 {
195 'apply' => {
196 'config_class_name' => 'Fstab::CommonOptions'
197 },
198 'when' => '$f1 eq \'debugfs\''
199 }
200 ]
201 }
202 },
203 'fs_freq',
204 {
205 'choice' => [
206 '0',
207 '1'
208 ],
209 'default' => '0',
210 'description' => 'Specifies if the file system needs to be dumped',
211 'type' => 'leaf',
212 'value_type' => 'enum',
213 'warp' => {
214 'follow' => {
215 'fstyp' => '- fs_vfstype',
216 'isbound' => '- fs_mntopts bind'
217 },
218 'rules' => [
219 {
220 'apply' => {
221 'choice' => [
222 '0'
223 ]
224 },
225 'when' => '$fstyp eq "none" and $isbound'
226 }
227 ]
228 }
229 },
230 'fs_passno',
231 {
232 'default' => 0,
233 'description' => 'used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time',
234 'summary' => 'fsck pass number',
235 'type' => 'leaf',
236 'value_type' => 'integer',
237 'warp' => {
238 'follow' => {
239 'fstyp' => '- fs_vfstype',
240 'isbound' => '- fs_mntopts bind'
241 },
242 'rules' => [
243 {
244 'apply' => {
245 'max' => '0'
246 },
247 'when' => '$fstyp eq "none" and $isbound'
248 }
249 ]
250 }
251 }
252 ],
253 'gist' => '{fs_vfstype}: {fs_file}',
254 'license' => 'LGPL2',
255 'name' => 'Fstab::FsLine'
256 }
257 ]
258 ;
« blib/lib/Config/Model/models/Fstab/Ext4FsOpt.pl ↑ Summary blib/lib/Config/Model/models/Fstab/NoneOptions.pl »