projects
/
pxelator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12c6284
)
use server.yaml as overlay instead of full replacement
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 9 Nov 2011 15:11:09 +0000
(15:11 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 9 Nov 2011 15:11:09 +0000
(15:11 +0000)
lib/PXElator/server.pm
patch
|
blob
|
history
diff --git
a/lib/PXElator/server.pm
b/lib/PXElator/server.pm
index
b6d2c45
..
951a48a
100644
(file)
--- a/
lib/PXElator/server.pm
+++ b/
lib/PXElator/server.pm
@@
-75,7
+75,10
@@
sub as_hash_for {
map { $server->{ $_ } = eval '$server::' . $_ } ( 'ip', 'netmask', 'bcast', 'domain', 'ip_from', 'ip_to', 'new_clients' );
my $server_path = "$server::conf/ip/$ip/server.yaml";
- $server = YAML::LoadFile $server_path if -e $server_path;
+ if ( -e $server_path ) {
+ my $overlay = YAML::LoadFile $server_path;
+ $server->{$_} = $overlay->{$_} foreach keys %$overlay;
+ }
return $server;
}