initial commit of file from CVS for smeserver-thinclient on Sat Sep 7 21:08:43 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 21:08:43 +10:00
parent d26600661b
commit 137c6dfb87
17 changed files with 2107 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
{
my $thinclient = $DB->get("thinclient") or return;
$thinclient->delete;
}

View File

@@ -0,0 +1 @@
32 bit EFI

View File

@@ -0,0 +1 @@
arch

View File

@@ -0,0 +1 @@
64 bit EFI

View File

@@ -0,0 +1 @@
arch

View File

@@ -0,0 +1 @@
default

View File

@@ -0,0 +1,3 @@
{
$DB = esmith::ConfigDB->open(${DB_FILENAME});
}

View File

@@ -0,0 +1,5 @@
{
my $default = $DB->get("default") or return;
$default->delete;
}

View File

@@ -0,0 +1,7 @@
{
if ($pxe{status} eq "enabled")
{
$OUT .= " # include infdividually managed workstations\n";
$OUT .= " include \"/etc/dhcpd.thinclient\";\n";
}
}

View File

@@ -0,0 +1,66 @@
{
if ($pxe{status} eq "enabled")
{
my $pxeclients = esmith::ConfigDB->open('thinclient');
my @pxedists = $pxeclients->get_all_by_prop('type' => 'dist');
$OUT .= "\n # Individually managed workstations defined by smeserver-thinclient\n\n";
foreach my $distrec (@pxedists)
{
my $dist = $distrec->key;
my $dir = $pxeclients->get_prop($dist, 'dir');
my $dprog = $pxeclients->get_prop($dist, 'prog');
my @macs = $pxeclients->get_all_by_prop('base', $dist);
if (@macs)
{
$OUT .= " group { # clients for $dist Distribution\n";
$OUT .= " allow bootp;\n";
my $seq = 0;
while (my ($arch, $aprog) = each (%pxe))
{
unless ($arch eq 'default' || $arch eq 'type' || $arch eq 'status' || $arch eq 'nextserver' || $arch eq 'dir')
{
my $prog = $pxeclients->get_prop($dist, $arch);
if ($prog)
{
++$seq;
if ($seq eq 1)
{
$OUT .= " if option client-architecture = $arch {\n";
$OUT .= " filename \"$dir/$prog\";\n";
$OUT .= " }\n";
}
else
{
$OUT .= " elsif option client-architecture = $arch {\n";
$OUT .= " filename \"$dir/$prog\";\n";
$OUT .= " }\n";
}
}
}
}
if ($seq eq 0)
{
$OUT .= " filename \"$dir/$dprog\";\n";
}
else
{
$OUT .= " else {\n";
$OUT .= " filename \"$dir/$dprog\";\n";
$OUT .= " }\n";
}
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 .= " hardware ethernet ".$client->key.";\n";
$OUT .= " }\n";
}
}
$OUT .= " }\n";
}
}
}
}

File diff suppressed because it is too large Load Diff