initial commit of file from CVS for smeserver-pxe on Sat Sep 7 20:56:31 AEST 2024
This commit is contained in:
parent
9449cfbf61
commit
4af109efa2
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
*.rpm
|
||||||
|
*.log
|
||||||
|
*spec-20*
|
||||||
|
*.tar.xz
|
21
Makefile
Normal file
21
Makefile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Makefile for source rpm: smeserver-pxe
|
||||||
|
# $Id: Makefile,v 1.1 2022/04/30 02:44:36 trevorb Exp $
|
||||||
|
NAME := smeserver-pxe
|
||||||
|
SPECFILE = $(firstword $(wildcard *.spec))
|
||||||
|
|
||||||
|
define find-makefile-common
|
||||||
|
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||||
|
|
||||||
|
ifeq ($(MAKEFILE_COMMON),)
|
||||||
|
# attept a checkout
|
||||||
|
define checkout-makefile-common
|
||||||
|
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(MAKEFILE_COMMON)
|
15
README.md
15
README.md
@ -1,3 +1,16 @@
|
|||||||
# smeserver-pxe
|
# <img src="https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png" width="25%" vertical="auto" style="vertical-align:bottom"> smeserver-pxe
|
||||||
|
|
||||||
SMEServer Koozali developed git repo for smeserver-pxe smecontribs
|
SMEServer Koozali developed git repo for smeserver-pxe smecontribs
|
||||||
|
|
||||||
|
## Wiki
|
||||||
|
<br />https://wiki.koozali.org/Pxe
|
||||||
|
<br />https://wiki.koozali.org/PXE_booting_to_BARTPE
|
||||||
|
|
||||||
|
## Bugzilla
|
||||||
|
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-pxe&product=SME%20Contribs&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
|
||||||
|
*Once it has been checked, then this comment will be deleted*
|
||||||
|
<br />
|
||||||
|
1
contriborbase
Normal file
1
contriborbase
Normal file
@ -0,0 +1 @@
|
|||||||
|
contribs10
|
14
createlinks
Normal file
14
createlinks
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
use esmith::Build::CreateLinks qw(:all);
|
||||||
|
use File::Basename;
|
||||||
|
use File::Path;
|
||||||
|
|
||||||
|
# our event specific for updating with yum without reboot
|
||||||
|
$event = 'smeserver-pxe-update';
|
||||||
|
#add here the path to your templates needed to expand
|
||||||
|
event_templates($event, '/etc/dhcpd.conf');
|
||||||
|
#action specific to this package
|
||||||
|
#event_link('action', $event, '30');
|
||||||
|
#services we need to restart
|
||||||
|
event_services($event, 'dhcpd' => 'restart');
|
1
root/etc/e-smith/db/configuration/defaults/pxe/00:06
Normal file
1
root/etc/e-smith/db/configuration/defaults/pxe/00:06
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOOTIA32.EFI
|
1
root/etc/e-smith/db/configuration/defaults/pxe/00:07
Normal file
1
root/etc/e-smith/db/configuration/defaults/pxe/00:07
Normal file
@ -0,0 +1 @@
|
|||||||
|
BOOTX64.EFI
|
1
root/etc/e-smith/db/configuration/defaults/pxe/default
Normal file
1
root/etc/e-smith/db/configuration/defaults/pxe/default
Normal file
@ -0,0 +1 @@
|
|||||||
|
pxelinux.0
|
1
root/etc/e-smith/db/configuration/defaults/pxe/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/pxe/status
Normal file
@ -0,0 +1 @@
|
|||||||
|
enabled
|
1
root/etc/e-smith/db/configuration/defaults/pxe/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/pxe/type
Normal file
@ -0,0 +1 @@
|
|||||||
|
configuration
|
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
if ($pxe{status} eq "enabled")
|
||||||
|
{
|
||||||
|
return "option client-architecture code 93 = unsigned integer 16;";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
42
root/etc/e-smith/templates/etc/dhcpd.conf/27pxe
Normal file
42
root/etc/e-smith/templates/etc/dhcpd.conf/27pxe
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
if ($pxe{status} eq "enabled")
|
||||||
|
{
|
||||||
|
if ($pxe{nextserver})
|
||||||
|
{
|
||||||
|
$OUT .= " next-server $pxe{nextserver};\n\n";
|
||||||
|
}
|
||||||
|
my $seq = 0;
|
||||||
|
while (my ($arch, $prog) = each (%pxe))
|
||||||
|
{
|
||||||
|
unless ($arch eq 'default' || $arch eq 'type' || $arch eq 'status' || $arch eq 'nextserver' || $arch eq 'dir')
|
||||||
|
{
|
||||||
|
if ($prog)
|
||||||
|
{
|
||||||
|
++$seq;
|
||||||
|
if ($seq eq 1)
|
||||||
|
{
|
||||||
|
$OUT .= " if option client-architecture = $arch {\n";
|
||||||
|
$OUT .= " filename \"$pxe{dir}/$prog\";\n";
|
||||||
|
$OUT .= " }\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$OUT .= " elsif option client-architecture = $arch {\n";
|
||||||
|
$OUT .= " filename \"$pxe{dir}/$prog\";\n";
|
||||||
|
$OUT .= " }\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($seq eq 0)
|
||||||
|
{
|
||||||
|
$OUT .= " filename \"$pxe{dir}/$pxe{default}\";\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$OUT .= " else {\n";
|
||||||
|
$OUT .= " filename \"$pxe{dir}/$pxe{default}\";\n";
|
||||||
|
$OUT .= " }\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
73
smeserver-pxe.spec
Normal file
73
smeserver-pxe.spec
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
# $Id: smeserver-pxe.spec,v 1.0 2022/04/28 18:45:26 brianr Exp $
|
||||||
|
# Authority: nocvs
|
||||||
|
# Name: Trevor Batley
|
||||||
|
|
||||||
|
Summary: Allow pxeboot of client machines over network
|
||||||
|
%define name smeserver-pxe
|
||||||
|
Name: %{name}
|
||||||
|
%define version 0.1
|
||||||
|
%define release 5
|
||||||
|
Version: %{version}
|
||||||
|
Release: %{release}%{?dist}
|
||||||
|
License: GPL
|
||||||
|
Group: Network
|
||||||
|
Source: %{name}-%{version}.tar.xz
|
||||||
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: e-smith-base
|
||||||
|
BuildRequires: e-smith-devtools >= 1.13.1-03
|
||||||
|
AutoReq: yes
|
||||||
|
|
||||||
|
%description
|
||||||
|
Global settings for dhcp to allow clients to network boot.
|
||||||
|
Assumes sme server is acting as dhcp server.
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat Sep 07 2024 cvs2git.sh aka Brian Read <brianr@koozali.org> 0.1-5.sme
|
||||||
|
- Roll up patches and move to git repo [SME: 12338]
|
||||||
|
|
||||||
|
* Sat Sep 07 2024 BogusDateBot
|
||||||
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
|
||||||
|
by assuming the date is correct and changing the weekday.
|
||||||
|
|
||||||
|
* Sat Jul 2 2022 Trevor Batley ,trevor@batley.id.au> 0.1-4.sme
|
||||||
|
- add event smeserver-pxe-update to trigger dhcpd restart via creatlinks [12087]
|
||||||
|
|
||||||
|
* Sat May 28 2022 Trevor Batley <trevor@batley.id.au> 0.1-3.sme
|
||||||
|
- Remove incorrect = sign from nextserver parameter and enclsing "'s
|
||||||
|
|
||||||
|
* Mon May 09 2022 Trevor Batley <trevor@batley.id.au> 0.1-2.sme
|
||||||
|
- Set default architecture executables to Centos 7 defaults [SME 11969]
|
||||||
|
|
||||||
|
* Thu Apr 28 2022 Trevor Batley <trevor@batley.id.au> 0.1-1.sme
|
||||||
|
- Initial release [SME 10821]
|
||||||
|
- Split of PXE Global parameters out of smeserver-thinclient
|
||||||
|
- Allow for different architectures (including UEFI booting)
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%setup -q -n %{name}-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
perl createlinks
|
||||||
|
|
||||||
|
%install
|
||||||
|
/bin/rm -rf $RPM_BUILD_ROOT
|
||||||
|
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
|
||||||
|
/bin/rm -f %{name}-%{version}-filelist
|
||||||
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files -f %{name}-%{version}-filelist
|
||||||
|
|
||||||
|
%defattr(-,root,root)
|
||||||
|
|
||||||
|
%pre
|
||||||
|
|
||||||
|
%preun
|
||||||
|
|
||||||
|
%post
|
||||||
|
|
||||||
|
%postun
|
Loading…
Reference in New Issue
Block a user