refs #202 adds chmods to tftpboots files
parent
4260b0e0e7
commit
c683d63973
|
@ -447,7 +447,7 @@ function uninstall() {
|
|||
[ ! -w $TFTPDIR ] && { echo "{\"error\": \"access installation directory.\"}"; exit 1; }
|
||||
|
||||
# Buscar el directorio correspondiente al checksum
|
||||
DIR=$(find $TFTPDIR -type f -name 'linuxISO.sum' -exec grep -l "$CHECKSUM" {} \; | xargs -I{} dirname {})
|
||||
DIR=$(find $TFTPDIR -type f -name 'ogclient.sqfs.sum' -exec grep -l "$CHECKSUM" {} \; | xargs -I{} dirname {})
|
||||
|
||||
# Si no se encuentra el directorio, devolver error
|
||||
if [ -z "$DIR" ]; then
|
||||
|
@ -525,7 +525,7 @@ function set_default() {
|
|||
[ ! -w $TFTPDIR ] && { echo "{\"error\": \"access installation directory.\"}"; exit 1; }
|
||||
|
||||
# Buscar el directorio correspondiente al checksum
|
||||
DIR=$(find $TFTPDIR -type f -name 'linuxISO.sum' -exec grep -l "$CHECKSUM" {} \; | xargs -I{} dirname {} | grep -v ".old")
|
||||
DIR=$(find $TFTPDIR -type f -name 'ogclient.sqfs.sum' -exec grep -l "$CHECKSUM" {} \; | xargs -I{} dirname {} | grep -v ".old")
|
||||
|
||||
# Si no se encuentra el directorio, devolver error
|
||||
if [ -z "$DIR" ]; then
|
||||
|
@ -600,7 +600,7 @@ function list_installed_oglives() {
|
|||
local OGLIVEARCH=""
|
||||
local OGLIVEREV=""
|
||||
local CHECKSUM=""
|
||||
local CHECKSUM_FILE="$TFTPDIR/$i/linuxISO.sum"
|
||||
local CHECKSUM_FILE="$TFTPDIR/$i/ogclient.sqfs.sum"
|
||||
|
||||
if [ -f "$CHECKSUM_FILE" ]; then
|
||||
CHECKSUM=$(cat "$CHECKSUM_FILE" | cut -d ' ' -f 1)
|
||||
|
@ -651,7 +651,7 @@ function get_info() {
|
|||
[ ! -w $TFTPDIR ] && { echo "{\"error\": \"access installation directory.\"}"; exit 1; }
|
||||
|
||||
# Buscar el directorio correspondiente al checksum, excluyendo los que terminan en .old.
|
||||
DIR=$(find $TFTPDIR -type f -name 'linuxISO.sum' -exec grep -l "$CHECKSUM" {} \; | grep -v '.old' | xargs -I{} dirname {})
|
||||
DIR=$(find $TFTPDIR -type f -name 'ogclient.sqfs.sum' -exec grep -l "$CHECKSUM" {} \; | grep -v '.old' | xargs -I{} dirname {})
|
||||
|
||||
# Si no se encuentra el directorio, devolver error.
|
||||
if [ -z "$DIR" ]; then
|
||||
|
|
|
@ -359,6 +359,7 @@ def og_boot_composer_install():
|
|||
os.remove(composer_lock_path)
|
||||
|
||||
install_swagger_ui() # Instalar Swagger UI
|
||||
subprocess.call(["sudo", "chown", "-R", "ogboot:ogboot", f"{INSTALL_OPENGNSYS_TARGET}/public"])
|
||||
|
||||
logger.info("Application skeleton created and composer.lock file removed.")
|
||||
|
||||
|
@ -691,6 +692,8 @@ def mount_NFS():
|
|||
logger.error("Could not build EFI file.")
|
||||
exit(1)
|
||||
subprocess.call(["sudo", "cp", "bin-x86_64-efi/ipxe.efi", f"{INSTALL_OPENGNSYS_TARGET}/tftpboot"])
|
||||
subprocess.call(["sudo", "chown", "-R", "tftp:ogboot", f"{INSTALL_OPENGNSYS_TARGET}/tftpboot/"])
|
||||
subprocess.run(["sudo", "chmod", "-R", "775", f"{INSTALL_OPENGNSYS_TARGET}/tftpboot/"])
|
||||
|
||||
def get_ip_address(interface):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue