refs #273 adds kea template

ogboot_installer
Luis Gerardo Romero Garcia 2024-05-09 10:16:49 +02:00
parent 5bbb624c65
commit d6bfa98e3e
2 changed files with 122 additions and 0 deletions

View File

@ -0,0 +1,44 @@
{
"Dhcp4": {
"interfaces-config": {
"interfaces": "INTERFACES"
},
"subnet4": [
{
"subnet": "192.168.2.0/24",
"option-data": [
{
"name": "routers",
"code": 3,
"data": "192.168.2.1"
}
],
"pools": []
}
],
"option-data": [
{
"name": "domain-name-servers",
"data": "1.1.1.1,8.8.8.8"
},
{
"name": "routers",
"data": "192.168.8.1,192.168.9.1"
}
],
"client-classes": [
{
"name": "UEFI-64",
"test": "not substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'",
"boot-file-name": "ipxe.efi",
"next-server": "SERVERIP"
},
{
"name": "Legacy",
"test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'",
"boot-file-name": "undionly.kpxe",
"next-server": "SERVERIP"
}
]
}
}

View File

@ -401,6 +401,84 @@ function copyServerFiles() {
popd || return
}
####################################################################
### Funciones de compilación de código fuente de servicios
####################################################################
# Compilar los servicios de OpenGnsys
#function servicesCompilation ()
#{
# local hayErrores=0
#
# # Compilar OpenGnsys Server
# echoAndLog "${FUNCNAME}(): Compiling OpenGnsys Admin Server"
# pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmServer
# make && mv ogAdmServer $INSTALL_TARGET/sbin
# if [ $? -ne 0 ]; then
# echoAndLog "${FUNCNAME}(): error while compiling OpenGnsys Admin Server"
# hayErrores=1
# fi
# popd
# # Compilar OpenGnsys Agent
# echoAndLog "${FUNCNAME}(): Compiling OpenGnsys Agent"
# pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmAgent
# make && mv ogAdmAgent $INSTALL_TARGET/sbin
# if [ $? -ne 0 ]; then
# echoAndLog "${FUNCNAME}(): error while compiling OpenGnsys Agent"
# hayErrores=1
# fi
# popd
# # Compilar OpenGnsys Client
# echoAndLog "${FUNCNAME}(): Compiling OpenGnsys Admin Client"
# pushd $WORKDIR/opengnsys/admin/Sources/Clients/ogAdmClient
# make && mv ogAdmClient ../../../../client/shared/bin
# if [ $? -ne 0 ]; then
# echoAndLog "${FUNCNAME}(): error while compiling OpenGnsys Admin Client"
# hayErrores=1
# fi
# popd
#
# return $hayErrores
#}
#REVISAR SI HACE FALTA Y COMO ESTRUCTURARLO!!!!!!!##################
####################################################################
### Funciones instalacion cliente opengnsys
####################################################################
#function copyClientFiles()
#{
# local errstatus=0
#
# echoAndLog "${FUNCNAME}(): Copying OpenGnsys Client files."
# cp -a $WORKDIR/opengnsys/client/shared/* $INSTALL_TARGET/client
# if [ $? -ne 0 ]; then
# errorAndLog "${FUNCNAME}(): error while copying client estructure"
# errstatus=1
# fi
#
# echoAndLog "${FUNCNAME}(): Copying OpenGnsys Cloning Engine files."
# mkdir -p $INSTALL_TARGET/client/lib/engine/bin
# cp -a $WORKDIR/opengnsys/client/engine/*.lib* $INSTALL_TARGET/client/lib/engine/bin
# if [ $? -ne 0 ]; then
# errorAndLog "${FUNCNAME}(): error while copying engine files"
# errstatus=1
# fi
#
# if [ $errstatus -eq 0 ]; then
# echoAndLog "${FUNCNAME}(): client copy files success."
# else
# errorAndLog "${FUNCNAME}(): client copy files with errors"
# fi
#
# return $errstatus
#}
generate_ipxe_script() {
echo "Generando script IPXE..."