refs #401 #404 Adds directories etc and lib that uses oglivecli and adds a new pxe template

ogboot_installer
Luis Gerardo Romero Garcia 2024-05-30 20:38:31 +02:00
parent bad709c0af
commit d342d88c80
2 changed files with 30 additions and 1 deletions

View File

@ -321,7 +321,11 @@ def create_ogboot_project(path_opengnsys_base):
src_dest = os.path.join(path_opengnsys_base, "src")
config_source = os.path.join(WORKDIR, "ogboot/config")
config_dest = os.path.join(path_opengnsys_base, "config")
config_dest = os.path.join(path_opengnsys_base, "config")
lib_source = os.path.join(WORKDIR, "ogboot/lib")
lib_dest = os.path.join(path_opengnsys_base, "lib")
if os.path.exists(bin_dest):
shutil.rmtree(bin_dest)
shutil.copytree(bin_source, bin_dest)
@ -334,6 +338,12 @@ def create_ogboot_project(path_opengnsys_base):
shutil.rmtree(config_dest)
shutil.copytree(config_source, config_dest)
if os.path.exists(lib_dest):
shutil.rmtree(lib_dest)
shutil.copytree(lib_source, lib_dest)
os.makedirs(os.path.join(INSTALL_TARGET, "etc"))
subprocess.run(["sudo", "chmod", "-R", "755", path_opengnsys_base])
subprocess.run(["sudo", "chown", "-R", "ogboot:ogboot", path_opengnsys_base])

View File

@ -0,0 +1,19 @@
#!ipxe
set timeout 0
set timeout-style hidden
set ISODIR __OGLIVE__
set default 0
set kernelargs __INFOHOST__
# Menú de entrada para seleccionar OgLive
:try_iso
kernel tftp://__SERVERIP__/${ISODIR}/ogvmlinuz ${kernelargs} || goto fallback
initrd tftp://172.17.8.86/${ISODIR}/oginitrd.img
boot
:fallback
echo "OgLive default"
set ISODIR ogLive
kernel tftp://__SERVERIP__/${ISODIR}/ogvmlinuz ${kernelargs}
initrd tftp://__SERVERIP__/${ISODIR}/oginitrd.img
boot