{
    if ($thinclient{status} eq "enabled")
	{
	my $pxeclients = esmith::ConfigDB->open('thinclient');
	my @macs = $pxeclients->get_all_by_prop('type','mac');
	foreach my $client (@macs)
	    {
	    if ($client->prop('status') eq 'enabled')
		{
		my $host = $client->prop('name') || $client->key;
		$host =~ s/://g;
		$OUT .= "host $host {\n";
		$OUT .= "	allow bootp;\n";
		my $dir = $pxeclients->get_prop($client->prop('base'), 'dir') || "";
		my $prog = $pxeclients->get_prop($client->prop('base'), 'prog') || "pxeclient.0";
		$OUT .= "	filename \"$dir/$prog\";\n";
		$OUT .= "	hardware ethernet ".$client->key.";\n";
		if ($client->prop('tftpserver'))
		    {
		    $OUT .= "       next-server $client->prop('tftpserver');\n";
		    }
		$OUT .= "}\n";
		}
	    }
        }
}

