1 |
package server; |
2 |
|
3 |
use warnings; |
4 |
use strict; |
5 |
|
6 |
use Module::Refresh; |
7 |
|
8 |
our $ip = '172.16.10.1'; |
9 |
our $netmask = '255.255.255.0'; |
10 |
|
11 |
our ( $ip_from, $ip_to ) = ( 10, 100 ); |
12 |
|
13 |
our $base_dir = '/home/dpavlin/llin/pxelator'; |
14 |
|
15 |
use config; |
16 |
|
17 |
our $debug; |
18 |
sub debug { $debug = config::shared('debug', @_) || 0 } |
19 |
|
20 |
my $timestamp_interval = 3; |
21 |
my $stderr_tell = 0; |
22 |
|
23 |
$SIG{ALRM} = sub { |
24 |
if ( tell(STDERR) != $stderr_tell ) { |
25 |
warn "\nTIMESTAMP: " . localtime() . "\n\n"; |
26 |
$stderr_tell = tell(STDERR); |
27 |
Module::Refresh->refresh; |
28 |
} |
29 |
alarm $timestamp_interval; |
30 |
}; |
31 |
alarm $timestamp_interval; |
32 |
|
33 |
warn "loaded"; |