line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sys::Info::Driver::Linux::Constants; |
2
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
67
|
|
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
65
|
|
4
|
2
|
|
|
2
|
|
12
|
use vars qw( $VERSION @EXPORT @EXPORT_OK %EXPORT_TAGS ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
173
|
|
5
|
2
|
|
|
2
|
|
12
|
use base qw( Exporter ); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
181
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.7903'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# uptime |
10
|
2
|
|
|
2
|
|
10
|
use constant UP_TIME => 0; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
113
|
|
11
|
2
|
|
|
2
|
|
10
|
use constant IDLE_TIME => 1; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
88
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# fstab entries |
14
|
2
|
|
|
2
|
|
11
|
use constant FS_SPECIFIER => 0; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
15261
|
|
15
|
2
|
|
|
2
|
|
20
|
use constant MOUNT_POINT => 1; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
132
|
|
16
|
2
|
|
|
2
|
|
11
|
use constant FS_TYPE => 2; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
82
|
|
17
|
2
|
|
|
2
|
|
37
|
use constant MOUNT_OPTS => 3; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
101
|
|
18
|
2
|
|
|
2
|
|
19
|
use constant DUMP_FREQ => 4; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
88
|
|
19
|
2
|
|
|
2
|
|
9
|
use constant FS_CHECK_ORDER => 5; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
80
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# getpwnam() |
22
|
2
|
|
|
2
|
|
10
|
use constant REAL_NAME_FIELD => 6; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
189
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# format: 'Linux version 1.2.3 (foo@bar.com)' |
25
|
|
|
|
|
|
|
# format: 'Linux version 1.2.3 (foo@bar.com) (gcc 1.2.3)' |
26
|
|
|
|
|
|
|
# format: 'Linux version 1.2.3 (foo@bar.com) (gcc 1.2.3 (Redhat blah blah))' |
27
|
2
|
|
|
|
|
272
|
use constant RE_LINUX_VERSION => qr{ |
28
|
|
|
|
|
|
|
\A |
29
|
|
|
|
|
|
|
Linux \s+ version \s |
30
|
|
|
|
|
|
|
(.+?) |
31
|
|
|
|
|
|
|
\s |
32
|
|
|
|
|
|
|
[(] .+? \@ .+? [)] |
33
|
|
|
|
|
|
|
(.*?) |
34
|
|
|
|
|
|
|
\z |
35
|
2
|
|
|
2
|
|
9
|
}xmsi; |
|
2
|
|
|
|
|
4
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# format: 'linux foo.domain.bar 1.2.3-foo' |
38
|
2
|
|
|
|
|
277
|
use constant RE_LINUX_VERSION2 => qr{ |
39
|
|
|
|
|
|
|
\A |
40
|
|
|
|
|
|
|
linux \s+ [a-zA-Z0-9.]+ \s+ |
41
|
|
|
|
|
|
|
([a-zA-Z0-9.]+)? |
42
|
2
|
|
|
2
|
|
10
|
}xmsi; |
|
2
|
|
|
|
|
4
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
%EXPORT_TAGS = ( |
45
|
|
|
|
|
|
|
uptime => [qw/ |
46
|
|
|
|
|
|
|
UP_TIME |
47
|
|
|
|
|
|
|
IDLE_TIME |
48
|
|
|
|
|
|
|
/], |
49
|
|
|
|
|
|
|
fstab => [qw/ |
50
|
|
|
|
|
|
|
FS_SPECIFIER |
51
|
|
|
|
|
|
|
MOUNT_POINT |
52
|
|
|
|
|
|
|
FS_TYPE |
53
|
|
|
|
|
|
|
MOUNT_OPTS |
54
|
|
|
|
|
|
|
DUMP_FREQ |
55
|
|
|
|
|
|
|
FS_CHECK_ORDER |
56
|
|
|
|
|
|
|
/], |
57
|
|
|
|
|
|
|
user => [qw/ |
58
|
|
|
|
|
|
|
REAL_NAME_FIELD |
59
|
|
|
|
|
|
|
/], |
60
|
|
|
|
|
|
|
general => [qw/ |
61
|
|
|
|
|
|
|
RE_LINUX_VERSION |
62
|
|
|
|
|
|
|
RE_LINUX_VERSION2 |
63
|
|
|
|
|
|
|
/], |
64
|
|
|
|
|
|
|
); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
@EXPORT_OK = map { @{ $_ } } values %EXPORT_TAGS; |
67
|
|
|
|
|
|
|
$EXPORT_TAGS{all} = \@EXPORT_OK; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__END__ |