From b8449bf0a73c72d60d4dbe49ff8acf4a26b3d4df Mon Sep 17 00:00:00 2001 From: lgromero Date: Mon, 13 May 2024 11:03:46 +0200 Subject: [PATCH] refs #347 adds dependencies to ogboot installer for ipxe-study branch --- installer/ogboot_installer.sh | 78 +++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/installer/ogboot_installer.sh b/installer/ogboot_installer.sh index f7b9c32..0d8bde6 100644 --- a/installer/ogboot_installer.sh +++ b/installer/ogboot_installer.sh @@ -28,6 +28,83 @@ function downloadCode() return 0 } +function checkDependencies() { + echoAndLog "Checking dependencies..." + + # Lista de dependencias + +local DEPENDENCIES=( + php + php-cli + php-fpm + php-json + php-pdo + php-mysql + php-zip + php-gd + php-mbstring + php-curl + php-xml + php-pear + php-bcmath + composer + unzip + apache2 + libapache2-mod-php + subversion + php-ldap + isc-dhcp-server + bittorrent + tftp-hpa + tftpd-hpa + xinetd + build-essential + g++-multilib + wget + curl + graphviz + bittornado + ctorrent + samba + rsync + netpipes + debootstrap + schroot + squashfs-tools + btrfs-tools + procps + arp-scan + realpath + gettext + moreutils + jq + wakeonlan + udpcast + libev-dev + libjansson-dev + libssl-dev + shim-signed + grub-efi-amd64-signed + gawk + libdbi-dev + libdbi1 + automake + liblz4-tool +) + + # Comprobar cada dependencia + for dep in "${DEPENDENCIES[@]}"; do + if ! dpkg -s "$dep" >/dev/null 2>&1; then + echoAndLog "$dep is not installed. Installing..." + sudo apt-get install -y "$dep" + else + echoAndLog "$dep is already installed." + fi + done + + echoAndLog "Dependencies checked." +} + function add_tftpboot_files() { # Navegar al directorio ogboot cd ogboot @@ -133,6 +210,7 @@ mount_NFS() { } +checkDependencies downloadCode $GIT_REPO if [ $? -ne 0 ]; then