Changeset 2302 for trunk/LATMOS-Accounts/lib/LATMOS/Accounts
- Timestamp:
- 11/27/19 20:03:02 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Buildnet.pm
r2299 r2302 709 709 ? '# ' . $desc . "\n" 710 710 : ''; 711 my ($fixedparam, $label , $netLockIp) = $retainip =~ /^\d+(\.\d+){3}$/712 ? ('fixed-address', '' , '127.0.0.1')713 : ('fixed-address6', '-6' , '::1');711 my ($fixedparam, $label) = $retainip =~ /^\d+(\.\d+){3}$/ 712 ? ('fixed-address', '' ) 713 : ('fixed-address6', '-6' ); 714 714 # If two ip are given for same protocol keep only first 715 715 $done{$fixedparam} and next; … … 719 719 $output .= sprintf("host %s-%s-%s%s {\n", $nethost, lc($fmac), $ZoneId, $label); 720 720 $output .= sprintf(" hardware ethernet %s;\n", $mac); 721 $output .= sprintf(" $fixedparam %s;\n", $retainip) 722 if ($retainip); 721 723 if ($obj->get_attributes('netLocked')) { 722 $output .= sprintf(" $fixedparam %s;\n", $netLockIp); 723 } else { 724 $output .= sprintf(" $fixedparam %s;\n", $retainip) 725 if ($retainip); 724 $output .= " deny booting;" 726 725 } 727 726 $output .= "}\n\n"; … … 804 803 $output .= sprintf("host %s-%s-%s {\n", $nethost, lc($fmac), $ZoneId); 805 804 $output .= sprintf(" hardware ethernet %s;\n", $mac); 806 $output .= sprintf(" fixed-address 127.0.0.1;\n");805 $output .= " deny booting;" 807 806 $output .= "}\n\n"; 808 807 } … … 810 809 $output .= sprintf("host %s-%s-%s {\n", $nethost, lc($fmac), $ZoneId); 811 810 $output .= sprintf(" hardware ethernet %s;\n", $mac); 812 $output .= sprintf(" fixed-address6 ::1\n");811 $output .= " deny booting;" 813 812 $output .= "}\n\n"; 814 813 }
Note: See TracChangeset
for help on using the changeset viewer.