line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Ym; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
BEGIN { |
6
|
1
|
|
|
1
|
|
24173
|
use Cwd; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
92
|
|
7
|
1
|
|
|
1
|
|
988
|
use FindBin; |
|
1
|
|
|
|
|
1422
|
|
|
1
|
|
|
|
|
132
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
40
|
chroot('/'); |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
|
|
19
|
$ENV{'YM_BIN'} = "$FindBin::RealBin"; |
12
|
1
|
|
|
|
|
95
|
$ENV{'YM_LIB'} = Cwd::abs_path("$ENV{'YM_BIN'}/../lib"); |
13
|
1
|
|
|
|
|
110
|
$ENV{'YM_ETC'} = Cwd::abs_path("$ENV{'YM_BIN'}/../etc"); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
21
|
use 5.008008; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
53
|
|
17
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
56
|
|
18
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
179
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
require Exporter; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
our @EXPORT_OK = qw ( |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
AddCommand |
27
|
|
|
|
|
|
|
AddHost |
28
|
|
|
|
|
|
|
AddHostgroup |
29
|
|
|
|
|
|
|
AddService |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
DeleteCommand |
32
|
|
|
|
|
|
|
DeleteHost |
33
|
|
|
|
|
|
|
DeleteHostgroup |
34
|
|
|
|
|
|
|
DeleteService |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
ModifyCommand |
37
|
|
|
|
|
|
|
ModifyHost |
38
|
|
|
|
|
|
|
ModifyHostgroup |
39
|
|
|
|
|
|
|
ModifyService |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
CopyHost |
42
|
|
|
|
|
|
|
CopyService |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
List |
45
|
|
|
|
|
|
|
Dump |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
VerifyDataStructure |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
GenerateCfg |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
GetMembers |
52
|
|
|
|
|
|
|
GetObjectList |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
GetStruct |
55
|
|
|
|
|
|
|
SaveStruct |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
List |
58
|
|
|
|
|
|
|
Dump |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
my $ymcfg = "$ENV{'YM_ETC'}/ymconfig.pl"; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
if (-s $ymcfg) { |
67
|
|
|
|
|
|
|
do $ymcfg; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
else { |
70
|
|
|
|
|
|
|
die "No config file [$ymcfg].\n"; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
1
|
|
|
1
|
|
1359
|
use Data::Dumper; |
|
1
|
|
|
|
|
12933
|
|
|
1
|
|
|
|
|
93
|
|
74
|
1
|
|
|
1
|
|
914
|
use File::Copy; |
|
1
|
|
|
|
|
2378
|
|
|
1
|
|
|
|
|
69
|
|
75
|
1
|
|
|
1
|
|
6864
|
use Storable qw/dclone store retrieve/; |
|
1
|
|
|
|
|
4515
|
|
|
1
|
|
|
|
|
188
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
require "Ym/ymcmd.pl"; |
78
|
|
|
|
|
|
|
require "Ym/ymcommon.pl"; |
79
|
|
|
|
|
|
|
require "Ym/ymgen.pl"; |
80
|
|
|
|
|
|
|
require "Ym/ymparse.pl"; |
81
|
|
|
|
|
|
|
require "Ym/ymdata.pl"; |
82
|
|
|
|
|
|
|
require "Ym/ymstat.pl"; |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
eval { |
85
|
|
|
|
|
|
|
require "Ym/ymspecific.pl"; |
86
|
|
|
|
|
|
|
YmSpecific->import(); |
87
|
|
|
|
|
|
|
}; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
1; |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
__END__ |