diff options
author | Marty Connor | 2010-01-17 03:47:39 +0100 |
---|---|---|
committer | Marty Connor | 2010-01-17 03:47:39 +0100 |
commit | 330abebddf67ab27998f64070f27d5874cbc7b06 (patch) | |
tree | 08f5954725930ee9c38b0afab4cb9a30c71ce7e3 /contrib/bootptodhcp/bootptodhcp.pl | |
parent | [sanboot] Prevent leaking a stack reference for "keep-san" AoE (diff) | |
download | ipxe-330abebddf67ab27998f64070f27d5874cbc7b06.tar.gz ipxe-330abebddf67ab27998f64070f27d5874cbc7b06.tar.xz ipxe-330abebddf67ab27998f64070f27d5874cbc7b06.zip |
[contrib] Move most contrib content to a separate repository
Most of the content that was previously in this directory has been
moved to a separate git repository:
http://git.etherboot.org/?p=contrib.git;a=summary
or the Etherboot Project wiki:
http://etherboot.org/
Diffstat (limited to 'contrib/bootptodhcp/bootptodhcp.pl')
-rwxr-xr-x | contrib/bootptodhcp/bootptodhcp.pl | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/contrib/bootptodhcp/bootptodhcp.pl b/contrib/bootptodhcp/bootptodhcp.pl deleted file mode 100755 index c8d6465a..00000000 --- a/contrib/bootptodhcp/bootptodhcp.pl +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/perl -w -# -# Quick hack to convert /etc/bootptab to format required by ISC DHCPD -# This only outputs the fixed hosts portion of the config file -# You still have to provide the global options and the subnet scoping -# -# Turn $useipaddr on if you prefer to use IP addresses in the config file -# I run DNS so I prefer domain names -$useipaddr = 0; -# This will be appended to get the FQDN unless the hostname is already FQDN -$domainname = "ken.com.au"; -$tftpdir = "/tftpdir/"; -open(B, "/etc/bootptab") or die "/etc/bootptab: $!\n"; -while(<B>) { - if (/^[^a-z]/) { - $prevline = $_; - next; - } - chomp($_); - ($hostname, @tags) = split(/:/, $_, 5); - ($fqdn = $hostname) .= ".$domainname" unless($hostname =~ /\./); - ($macaddr) = grep(/^ha=/, @tags); - $macaddr =~ s/ha=//; - $macaddr =~ s/(..)(..)(..)(..)(..)(..)/$1:$2:$3:$4:$5:$6/g; - ($ipaddr) = grep(/^ip=/, @tags); - $ipaddr =~ s/ip=//; - ($bootfile) = grep(/^bf=/, @tags); - $bootfile =~ s/bf=//; - $bootfile = $tftpdir . $bootfile; -# I have a comment line above most entries and I like to carry this over - print $prevline if ($prevline =~ /^#/); - $address = $useipaddr ? $ipaddr : $fqdn; - print <<EOF - host $hostname { - hardware ethernet $macaddr; - fixed-address $address; - filename "$bootfile"; - } -EOF -; - $prevline = $_; -} |