line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Information on remote system type 0 is obtained through an |
2
|
|
|
|
|
|
|
# informal document. I guess this remote system type is out |
3
|
|
|
|
|
|
|
# of fashion... |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
710
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
47
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
8
|
1
|
|
|
1
|
|
7
|
use HH::Unispool::Config::OS; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
9
|
1
|
|
|
1
|
|
6
|
use HH::Unispool::Config::Scope; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
10
|
1
|
|
|
1
|
|
5
|
use HH::Unispool::Config::Entry::System; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
11
|
1
|
|
|
1
|
|
7
|
use HH::Unispool::Config::Entry::RemoteSystem::3; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
192
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# Create a config from scratch with a _Local_ scope |
14
|
|
|
|
|
|
|
my $conf = HH::Unispool::Config->new( { |
15
|
|
|
|
|
|
|
scope => HH::Unispool::Config::Scope->new ( { |
16
|
|
|
|
|
|
|
scope => [ qw( _Local_) ], |
17
|
|
|
|
|
|
|
} ), |
18
|
|
|
|
|
|
|
} ); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Create the _Local_ system and add it to the configuration |
21
|
|
|
|
|
|
|
my $sysn = HH::Unispool::Config::Entry::System->new( { |
22
|
|
|
|
|
|
|
name => '_Local_', |
23
|
|
|
|
|
|
|
local_system_name => 'foo', |
24
|
|
|
|
|
|
|
network_name => 'foo.bar.org', |
25
|
|
|
|
|
|
|
os => HH::Unispool::Config::OS->new( { |
26
|
|
|
|
|
|
|
os => 'Solaris', |
27
|
|
|
|
|
|
|
} ), |
28
|
|
|
|
|
|
|
} ); |
29
|
|
|
|
|
|
|
$conf->add_system($sysn); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# Add a type 3 remote system to _Local_ |
32
|
|
|
|
|
|
|
my $dev = HH::Unispool::Config::Entry::RemoteSystem::3->new( { |
33
|
|
|
|
|
|
|
name => 'rsys3', |
34
|
|
|
|
|
|
|
acct => 'fred', |
35
|
|
|
|
|
|
|
apass => '123wilma', |
36
|
|
|
|
|
|
|
upass => '123pebbles', |
37
|
|
|
|
|
|
|
remote_node_name => 'barney.bedrock.org', |
38
|
|
|
|
|
|
|
} ); |
39
|
|
|
|
|
|
|
$sysn->add_remote_system($dev); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# Write the configuration |
42
|
|
|
|
|
|
|
$conf->write('t/config.sample.r3.out'); |
43
|
|
|
|
|
|
|
1; |