pf-tools/pf-tools: take header into account
parmelan-guest at users.alioth.debian.org
parmelan-guest at users.alioth.debian.org
Fri Apr 25 13:54:30 UTC 2014
details: http://hg.debian.org/hg/pf-tools/pf-tools/rev/e87b796b7c34
changeset: 1277:e87b796b7c34
user: shad
date: Fri Apr 25 15:54:27 2014 +0200
description:
take header into account
diffstat:
lib/PFTools/Utils.pm | 11 +++++++++--
sbin/mk_dhcp | 6 ++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diffs (59 lines):
diff -r 025400ebe4f6 -r e87b796b7c34 lib/PFTools/Utils.pm
--- a/lib/PFTools/Utils.pm Fri Apr 25 11:52:34 2014 +0200
+++ b/lib/PFTools/Utils.pm Fri Apr 25 15:54:27 2014 +0200
@@ -1994,7 +1994,8 @@
sub __build_dhcpd_conf {
my ($args_ref) = @_;
- check_mandatory_true_args_type( $args_ref, q{}, qw( site_name ) );
+ check_mandatory_true_args_type( $args_ref, q{},
+ qw( site_name header_filename ) );
check_optional_args_type( $args_ref, q{}, qw( template_filename ) );
check_mandatory_args_type( $args_ref, q{HASH}, qw( global_config ) );
@@ -2044,8 +2045,14 @@
};
my $lines_ref = [
split qr{ \n }xms,
- __read_and_process_template( $template_filename, $vars_ref ), -1
+ __read_and_process_template(
+ $args_ref->{'header_filename'}, $vars_ref
+ ),
+ -1
];
+ push @{$lines_ref},
+ split qr{ \n }xms,
+ __read_and_process_template( $template_filename, $vars_ref ), -1;
return $lines_ref;
}
diff -r 025400ebe4f6 -r e87b796b7c34 sbin/mk_dhcp
--- a/sbin/mk_dhcp Fri Apr 25 11:52:34 2014 +0200
+++ b/sbin/mk_dhcp Fri Apr 25 15:54:27 2014 +0200
@@ -36,8 +36,8 @@
# VARS
my @options_specs = (
- 'config|c=s', 'help', 'output|o=s', 'site|s=s',
- 'store=s', 'template|t=s',
+ 'config|c=s', 'help', 'output|o=s', 'site|s=s',
+ 'store=s', 'template|t=s', 'header|H=s',
);
############################################
@@ -59,6 +59,7 @@
--store : file where global structure datas are in storable format (optional)
-c --config : pf-tools config file (optional)
-o --output : output file
+ -H --header : header file
ENDHELP
return;
@@ -86,6 +87,7 @@
make_dhcpd_conf_file(
{ site_name => $options->{'site'},
template_filename => $options->{'template'},
+ header_filename => $options->{'header'},
filename => $options->{'output'},
global_config => $global_config,
pf_config => $pf_config,
More information about the pf-tools-commits
mailing list