initial commit of file from CVS for smeserver-thinclient on Sat Sep 7 21:08:43 AEST 2024
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
my $thinclient = $DB->get("thinclient") or return;
|
||||
|
||||
$thinclient->delete;
|
||||
}
|
1
root/etc/e-smith/db/thinclient/defaults/00:06/name
Normal file
1
root/etc/e-smith/db/thinclient/defaults/00:06/name
Normal file
@@ -0,0 +1 @@
|
||||
32 bit EFI
|
1
root/etc/e-smith/db/thinclient/defaults/00:06/type
Normal file
1
root/etc/e-smith/db/thinclient/defaults/00:06/type
Normal file
@@ -0,0 +1 @@
|
||||
arch
|
1
root/etc/e-smith/db/thinclient/defaults/00:07/name
Normal file
1
root/etc/e-smith/db/thinclient/defaults/00:07/name
Normal file
@@ -0,0 +1 @@
|
||||
64 bit EFI
|
1
root/etc/e-smith/db/thinclient/defaults/00:07/type
Normal file
1
root/etc/e-smith/db/thinclient/defaults/00:07/type
Normal file
@@ -0,0 +1 @@
|
||||
arch
|
1
root/etc/e-smith/db/thinclient/defaults/defaultbase/type
Normal file
1
root/etc/e-smith/db/thinclient/defaults/defaultbase/type
Normal file
@@ -0,0 +1 @@
|
||||
default
|
3
root/etc/e-smith/db/thinclient/migrate/00openRW
Normal file
3
root/etc/e-smith/db/thinclient/migrate/00openRW
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
$DB = esmith::ConfigDB->open(${DB_FILENAME});
|
||||
}
|
5
root/etc/e-smith/db/thinclient/migrate/default.remove
Normal file
5
root/etc/e-smith/db/thinclient/migrate/default.remove
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
my $default = $DB->get("default") or return;
|
||||
|
||||
$default->delete;
|
||||
}
|
7
root/etc/e-smith/templates/etc/dhcpd.conf/28pxeclients
Normal file
7
root/etc/e-smith/templates/etc/dhcpd.conf/28pxeclients
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
if ($pxe{status} eq "enabled")
|
||||
{
|
||||
$OUT .= " # include infdividually managed workstations\n";
|
||||
$OUT .= " include \"/etc/dhcpd.thinclient\";\n";
|
||||
}
|
||||
}
|
66
root/etc/e-smith/templates/etc/dhcpd.thinclient/28pxeclients
Normal file
66
root/etc/e-smith/templates/etc/dhcpd.thinclient/28pxeclients
Normal 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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1762
root/etc/e-smith/web/functions/thinclient
Executable file
1762
root/etc/e-smith/web/functions/thinclient
Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user