basic implementation, rancid graph and nodemonitor missing
This commit is contained in:
@@ -135,6 +135,20 @@ if ($ENV{NETDISCO_DOMAIN}) {
|
||||
}
|
||||
}
|
||||
|
||||
# convert domain_suffix from scalar or list to regexp
|
||||
|
||||
config->{'domain_suffix'} = [setting('domain_suffix')]
|
||||
if ref [] ne ref setting('domain_suffix');
|
||||
|
||||
if (scalar @{ setting('domain_suffix') }) {
|
||||
my @suffixes = map { quotemeta } @{ setting('domain_suffix') };
|
||||
my $buildref = '(?:'. (join '|', @suffixes) .')$';
|
||||
config->{'domain_suffix'} = qr/$buildref/;
|
||||
}
|
||||
else {
|
||||
config->{'domain_suffix'} = qr//;
|
||||
}
|
||||
|
||||
# support unordered dictionary as if it were a single item list
|
||||
if (ref {} eq ref setting('device_identity')) {
|
||||
config->{'device_identity'} = [ setting('device_identity') ];
|
||||
|
||||
Reference in New Issue
Block a user