libreschool-pxeserver/root/etc/e-smith/templates/etc/dnsmasq.conf/81tftp

19 lines
493 B
Plaintext

#
# 81tftp
#
{
$status = $dnsmasq{'tftp-status'} || 'disabled';
use esmith::NetworksDB;
my $ndb = esmith::NetworksDB->open_ro();
my $lan = $ndb->green();
my $ip = $lan->prop('ipaddr');
my $port = ${'pxeserver-httpd'}{TCPPort} || "3001";
if ($status eq 'enabled') {
$OUT.="dhcp-userclass=ENH,iPXE\n";
$OUT.="dhcp-option=66,\"$ip\"\n";
$OUT.="dhcp-boot=net:ENH,http://$ip:$port/boot.php\n";
$OUT.="dhcp-boot=undionly.kpxe\n";
}
}