Home | History | Annotate | Download | only in ms2isc

Lines Matching refs:outfile

116 	my ($outfile, $i, $j, @Domains);

118 $outfile = new FileHandle "> $opts{o}";
119 if (!defined $outfile) {
124 print $outfile "\n##############################################################\n";
127 print $outfile "shared-network $Scopename {\n";
129 PrintSubnetConfig($outfile, \%GlobalOptions, \%{$Scopes{$j}}, $j, "\t", $opts{f});
133 print $outfile "}\n";
136 PrintSubnetUpdate($outfile, $j, $opts{p}, $opts{k});
142 print $outfile "\n##############################################################\n";
143 PrintSubnetConfig($outfile, \%GlobalOptions, \%{$Scopes{$i}}, $i, "", $opts{f});
144 if ($opts{p} or $opts{k}) { PrintSubnetUpdate($outfile, $i, $opts{p}, $opts{k}); }
151 PrintDomainUpdate($outfile, $i, $opts{p}, $opts{k});
155 undef ($outfile);
186 my ($outfile, $Domain, $DDNSServer, $key) = @_;
189 # $outfile: filehandle of the file to write the output to
197 print $outfile "zone $Domain {\n";
198 print $outfile "\tprimary $DDNSServer;\n";
199 !$key or print $outfile "\tkey $key;\n";
200 print $outfile "}\n";
205 my ($outfile, $Subnet, $DDNSServer, $key) = @_;
208 # $outfile: filehandle of the file to write the output to
221 print $outfile "zone $Reverse.in-addr.arpa. {\n";
222 print $outfile "\tprimary $DDNSServer;\n";
223 !$key or print $outfile "\tkey $key;\n";
224 print $outfile "}\n";
229 my ($outfile, $GlobalOptions, $Scope, $Subnet, $prefix, $failover) = @_;
233 # $outfile: filehandle of the file to write the output to
243 print $outfile $pound, "subnet $Subnet netmask ${$Scope}{mask} {\n";
244 print $outfile "$prefix# Name: ${$Scope}{name}\n";
245 print $outfile "$prefix# Comment: ${$Scope}{comment}\n";
247 print $outfile $pound, "\toption routers @{${$Scope}{routers}};\n";
249 print $outfile $pound, "\toption routers @{${$GlobalOptions}{routers}};\t# NOTE: obtained from global option, bad practice detected\n";
251 print $outfile "### WARNING: No router was found for this subnet!!! ##########\n";
255 print $outfile $pound, "\toption domain-name-servers ", join(",", @{${$Scope}{dnses}}), ";\n";
257 print $outfile $pound, "\toption domain-name-servers ", join(",", @{${$GlobalOptions}{dnses}}), ";\n";
261 print $outfile $pound, "\toption domain-name \"${$Scope}{domain}\";\n";
263 print $outfile $pound, "\toption domain-name \"${$GlobalOptions}{domain}\";\n";
267 print $outfile $pound, "\toption broadcast-address ${$Scope}{broadcast};\n";
269 print $outfile $pound, "\toption broadcast-address ${$GlobalOptions}{broadcast};\n";
273 print $outfile $pound, "\toption netbios-name-servers ", join(",", @{${$Scope}{winses}}), ";\n";
275 print $outfile $pound, "\toption netbios-name-servers ", join(",", @{${$GlobalOptions}{winses}}), ";\n";
279 print $outfile $pound, "\toption netbios-node-type ${$Scope}{winstype};\n";
281 print $outfile $pound, "\toption netbios-node-type ${$GlobalOptions}{winstype};\n"
284 print $outfile $pound, "\tdefault-lease-time ${$Scope}{leaseduration};\n";
285 print $outfile $pound, "\tpool {\n";
287 print $outfile $pound, "\t\trange ${$Scope}{ranges}[$r] ${$Scope}{ranges}[$r+1];\n";
289 !$failover or print $outfile $pound, "\t\tfailover peer \"$failover\";\n";
290 print $outfile $pound, "\t\tdeny dynamic bootp clients;\n";
291 print $outfile $pound, "\t}\n";
292 print $outfile $pound, "}\n";