still allow predefined IPs with dhcpd
This commit is contained in:
parent
1deb682f87
commit
d48936e76f
|
@ -198,6 +198,7 @@ sub render_install_conf {
|
||||||
my $jot_pass = qx(jot -rcs '' 20 46 125);
|
my $jot_pass = qx(jot -rcs '' 20 46 125);
|
||||||
chomp($jot_pass);
|
chomp($jot_pass);
|
||||||
my $_ipv4 = $vms{$vm_name}{'ipv4'} || "autoconf";
|
my $_ipv4 = $vms{$vm_name}{'ipv4'} || "autoconf";
|
||||||
|
$_ipv4 = "autoconf" if $conf{'conf'}{'DHCPD'} eq "yes";
|
||||||
my $_ipv4_gateway = $vms{$vm_name}{'ipv4_gw'} || $conf{'conf'}{'ROUTER'};
|
my $_ipv4_gateway = $vms{$vm_name}{'ipv4_gw'} || $conf{'conf'}{'ROUTER'};
|
||||||
my $_ipv6 = $vms{$vm_name}{'ipv6'} || $conf{'conf'}{'IPV6_PREFIX'} . ":" . ($conf{'conf'}{'IPV6_START'} + $vms{$vm_name}{'vm_number'}) . "::" . ($conf{'conf'}{'IP_START'} + $vms{$vm_name}{'vm_number'});
|
my $_ipv6 = $vms{$vm_name}{'ipv6'} || $conf{'conf'}{'IPV6_PREFIX'} . ":" . ($conf{'conf'}{'IPV6_START'} + $vms{$vm_name}{'vm_number'}) . "::" . ($conf{'conf'}{'IP_START'} + $vms{$vm_name}{'vm_number'});
|
||||||
my $_ipv6_gateway = $vms{$vm_name}{'ipv6_gw'} || $conf{'conf'}{'IPV6_PREFIX'} . ":" . ($conf{'conf'}{'IPV6_START'} + $vms{$vm_name}{'vm_number'}) . "::1";
|
my $_ipv6_gateway = $vms{$vm_name}{'ipv6_gw'} || $conf{'conf'}{'IPV6_PREFIX'} . ":" . ($conf{'conf'}{'IPV6_START'} + $vms{$vm_name}{'vm_number'}) . "::1";
|
||||||
|
@ -362,12 +363,12 @@ my %vms;
|
||||||
my @files = glob "$conf{'conf'}{'VMS'}/*.txt";
|
my @files = glob "$conf{'conf'}{'VMS'}/*.txt";
|
||||||
%vms = get_variables('vms', @files);
|
%vms = get_variables('vms', @files);
|
||||||
|
|
||||||
my $DHCP = $conf{'conf'}{'DHCP'} || "yes";
|
$conf{'conf'}{'DHCPD'} = "yes" if ! $conf{'conf'}{'DHCPD'};
|
||||||
|
|
||||||
# run all functions
|
# run all functions
|
||||||
#debug_parse(\%conf, \%vms);
|
#debug_parse(\%conf, \%vms);
|
||||||
render_vm_conf(\%conf, \%vms);
|
render_vm_conf(\%conf, \%vms);
|
||||||
render_dhcpd_conf(\%conf, \%vms) if $DHCP eq "yes";
|
render_dhcpd_conf(\%conf, \%vms) if $conf{'conf'}{'DHCPD'} eq "yes";
|
||||||
render_install_conf(\%conf, \%vms);
|
render_install_conf(\%conf, \%vms);
|
||||||
create_accounts(\%conf, \%vms);
|
create_accounts(\%conf, \%vms);
|
||||||
create_img_files(\%conf, \%vms);
|
create_img_files(\%conf, \%vms);
|
||||||
|
|
Loading…
Reference in New Issue