« blib/lib/Config/Model/models/Fstab/SwapOptions.pl
↑ Summary
blib/lib/Config/Model/models/PopCon.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 | 'copyright' => [ | ||
| 21 | '2026, Dominique Dumont' | ||
| 22 | ], | ||
| 23 | 'element' => [ | ||
| 24 | 'uid', | ||
| 25 | { | ||
| 26 | 'description' => 'Set the owner and group of all files. (Default: the UID and GID of the current process.)', | ||
| 27 | 'type' => 'leaf', | ||
| 28 | 'value_type' => 'uniline' | ||
| 29 | }, | ||
| 30 | 'gid', | ||
| 31 | '*uid', | ||
| 32 | 'umask', | ||
| 33 | { | ||
| 34 | 'description' => 'Set the umask (the bitmask of the permissions that are not present). The default is the umask of the current process. The value is given in octal.', | ||
| 35 | 'type' => 'leaf', | ||
| 36 | 'value_type' => 'uniline' | ||
| 37 | }, | ||
| 38 | 'dmask', | ||
| 39 | { | ||
| 40 | 'description' => 'Set the umask applied to directories only. The default is the umask of the current process. The value is given in octal.', | ||
| 41 | 'type' => 'leaf', | ||
| 42 | 'value_type' => 'uniline' | ||
| 43 | }, | ||
| 44 | 'fmask', | ||
| 45 | { | ||
| 46 | 'description' => 'Set the umask applied to regular files only. The default is the umask of the current process. The value is given in octal.', | ||
| 47 | 'type' => 'leaf', | ||
| 48 | 'value_type' => 'uniline' | ||
| 49 | }, | ||
| 50 | 'allow_utime', | ||
| 51 | { | ||
| 52 | 'description' => "=pod | ||
| 53 | |||
| 54 | This option controls the permission check of mtime/atime. Possible | ||
| 55 | values: | ||
| 56 | |||
| 57 | '.'=over | ||
| 58 | |||
| 59 | '.'=item 20 | ||
| 60 | |||
| 61 | If the current process is in the group of the file\x{2019}s group ID, you can | ||
| 62 | change the timestamp. | ||
| 63 | |||
| 64 | '.'=item 2 | ||
| 65 | |||
| 66 | Other users can change the timestamp. | ||
| 67 | |||
| 68 | '.'=back | ||
| 69 | |||
| 70 | |||
| 71 | The default is set from the above dmask option. (If the directory is | ||
| 72 | writable, utime(2) is also allowed. That is: ~dmask & 022.) | ||
| 73 | |||
| 74 | Normally utime(2) checks that the current process is the owner of the | ||
| 75 | file, or that it has the CAP_FOWNER capability. But FAT filesystems | ||
| 76 | don\x{2019}t have UID/GID on disk, so the normal check is too | ||
| 77 | inflexible. With this option you can relax it. | ||
| 78 | ", | ||
| 79 | 'type' => 'leaf', | ||
| 80 | 'value_type' => 'uniline' | ||
| 81 | }, | ||
| 82 | 'check', | ||
| 83 | { | ||
| 84 | 'choice' => [ | ||
| 85 | 'r', | ||
| 86 | 'n', | ||
| 87 | 's' | ||
| 88 | ], | ||
| 89 | 'description' => 'Check file names. Three different levels of pickiness can be chosen: r[elaxed] n[ormal] or s[trict] | ||
| 90 | |||
| 91 | ', | ||
| 92 | 'help' => { | ||
| 93 | 'n' => 'n[ormal]: Like "relaxed", but many special characters (*, ?, <, | ||
| 94 | spaces, etc.) are rejected. This is the default.', | ||
| 95 | 'r' => 'r[elaxed]: Upper and lower case are accepted and equivalent, long name | ||
| 96 | parts are truncated (e.g. verylongname.foobar becomes verylong.foo), | ||
| 97 | leading and embedded spaces are accepted in each name part (name and | ||
| 98 | extension). | ||
| 99 | ', | ||
| 100 | 's' => 's[trict]: Like "normal", but names that contain long parts or special | ||
| 101 | characters that are sometimes used on Linux but are not accepted by | ||
| 102 | MS-DOS (+, =, etc.) are rejected. | ||
| 103 | ' | ||
| 104 | }, | ||
| 105 | 'type' => 'leaf', | ||
| 106 | 'upstream_default' => 'n', | ||
| 107 | 'value_type' => 'enum' | ||
| 108 | }, | ||
| 109 | 'codepage', | ||
| 110 | { | ||
| 111 | 'description' => 'Sets the codepage for converting to shortname characters on FAT and VFAT filesystems. By default, codepage 437 is used.', | ||
| 112 | 'type' => 'leaf', | ||
| 113 | 'value_type' => 'uniline' | ||
| 114 | }, | ||
| 115 | 'debug', | ||
| 116 | { | ||
| 117 | 'description' => 'Turn on the debug flag. A version string and a list of filesystem parameters will be printed (these data are also printed if the parameters appear to be inconsistent).', | ||
| 118 | 'type' => 'leaf', | ||
| 119 | 'value_type' => 'boolean' | ||
| 120 | }, | ||
| 121 | 'discard', | ||
| 122 | { | ||
| 123 | 'description' => 'If set, causes discard/TRIM commands to be issued to the block device when blocks are freed. This is useful for SSD devices and sparse/thinly-provisioned LUNs.', | ||
| 124 | 'type' => 'leaf', | ||
| 125 | 'value_type' => 'boolean' | ||
| 126 | }, | ||
| 127 | 'dos1xfloppy', | ||
| 128 | { | ||
| 129 | 'description' => 'If set, use a fallback default BIOS Parameter Block configuration, determined by backing device size. These static parameters match defaults assumed by DOS 1.x for 160 kiB, 180 kiB, 320 kiB, and 360 kiB floppies and floppy images.', | ||
| 130 | 'type' => 'leaf', | ||
| 131 | 'value_type' => 'boolean' | ||
| 132 | }, | ||
| 133 | 'errors', | ||
| 134 | { | ||
| 135 | 'choice' => [ | ||
| 136 | 'panic', | ||
| 137 | 'continue', | ||
| 138 | 'remount-ro' | ||
| 139 | ], | ||
| 140 | 'description' => 'Specify FAT behavior on critical errors: panic, continue without doing anything, or remount the partition in read-only mode (default behavior). | ||
| 141 | ', | ||
| 142 | 'type' => 'leaf', | ||
| 143 | 'upstream_default' => 'remount-ro', | ||
| 144 | 'value_type' => 'enum' | ||
| 145 | }, | ||
| 146 | 'fat', | ||
| 147 | { | ||
| 148 | 'choice' => [ | ||
| 149 | '12', | ||
| 150 | '16', | ||
| 151 | '32' | ||
| 152 | ], | ||
| 153 | 'description' => 'Specify a 12, 16 or 32 bit fat. This overrides the automatic FAT type detection routine. Use with caution! | ||
| 154 | ', | ||
| 155 | 'type' => 'leaf', | ||
| 156 | 'value_type' => 'enum' | ||
| 157 | }, | ||
| 158 | 'iocharsets', | ||
| 159 | { | ||
| 160 | 'description' => 'Character set to use for converting between 8 bit characters and 16 bit Unicode characters. The default is iso8859-1. Long filenames are stored on disk in Unicode format.', | ||
| 161 | 'type' => 'leaf', | ||
| 162 | 'value_type' => 'uniline' | ||
| 163 | }, | ||
| 164 | 'tz', | ||
| 165 | { | ||
| 166 | 'choice' => [ | ||
| 167 | 'UTC' | ||
| 168 | ], | ||
| 169 | 'description' => 'This option disables the conversion of timestamps between local time (as used by Windows on FAT) and UTC (which Linux uses internally). This is particularly useful when mounting devices (like digital cameras) that are set to UTC in order to avoid the pitfalls of local time.', | ||
| 170 | 'type' => 'leaf', | ||
| 171 | 'value_type' => 'enum' | ||
| 172 | }, | ||
| 173 | 'time_offset', | ||
| 174 | { | ||
| 175 | 'description' => 'Set offset for conversion of timestamps from local time used by FAT to UTC. I.e., minutes will be subtracted from each timestamp to convert it to UTC used internally by Linux. This is useful when the time zone set in the kernel via settimeofday(2) is not the time zone used by the filesystem. Note that this option still does not provide correct time stamps in all cases in presence of DST - time stamps in a different DST setting will be off by one hour.', | ||
| 176 | 'type' => 'leaf', | ||
| 177 | 'value_type' => 'integer' | ||
| 178 | }, | ||
| 179 | 'quiet', | ||
| 180 | { | ||
| 181 | 'description' => 'Turn on the quiet flag. Attempts to chown or chmod files do not return errors, although they fail. Use with caution!', | ||
| 182 | 'type' => 'leaf', | ||
| 183 | 'value_type' => 'boolean' | ||
| 184 | }, | ||
| 185 | 'rodir', | ||
| 186 | { | ||
| 187 | 'description' => "FAT has the ATTR_RO (read-only) attribute. On Windows, the ATTR_RO of the directory will just be ignored, and is used only by applications as a flag (e.g. it\x{2019}s set for the customized folder). | ||
| 188 | |||
| 189 | If you want to use ATTR_RO as read-only flag even for the directory, set this option.", | ||
| 190 | 'type' => 'leaf', | ||
| 191 | 'value_type' => 'boolean' | ||
| 192 | }, | ||
| 193 | 'showexec', | ||
| 194 | { | ||
| 195 | 'description' => 'If set, the execute permission bits of the file will be allowed only if the extension part of the name is .EXE, .COM, or .BAT. Not set by default. | ||
| 196 | ', | ||
| 197 | 'type' => 'leaf', | ||
| 198 | 'value_type' => 'boolean' | ||
| 199 | }, | ||
| 200 | 'sys_immutable', | ||
| 201 | { | ||
| 202 | 'description' => 'If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux. Not set by default.', | ||
| 203 | 'type' => 'leaf', | ||
| 204 | 'value_type' => 'boolean' | ||
| 205 | }, | ||
| 206 | 'flush', | ||
| 207 | { | ||
| 208 | 'description' => 'If set, the filesystem will try to flush to disk more early than normal. Not set by default.', | ||
| 209 | 'type' => 'leaf', | ||
| 210 | 'value_type' => 'boolean' | ||
| 211 | }, | ||
| 212 | 'usefree', | ||
| 213 | { | ||
| 214 | 'description' => "Use the \"free clusters\" value stored on FSINFO. It\x{2019}ll be used to determine number of free clusters without scanning disk. But it\x{2019}s not used by default, because recent Windows don\x{2019}t update it correctly in some case. If you are sure the \"free clusters\" on FSINFO is correct, by this option you can avoid scanning disk.", | ||
| 215 | 'type' => 'leaf', | ||
| 216 | 'value_type' => 'boolean' | ||
| 217 | } | ||
| 218 | ], | ||
| 219 | 'include' => [ | ||
| 220 | 'Fstab::CommonOptions' | ||
| 221 | ], | ||
| 222 | 'license' => 'LGPL2', | ||
| 223 | 'name' => 'Fstab::VfatOpt' | ||
| 224 | } | ||
| 225 | ] | ||
| 226 | ; | ||