From 906c5293dd7a9f582a36d235e0b13887a861999a Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 21 Sep 2018 12:37:54 +0200 Subject: [*] Preparations for new iPXE (mtools, mkdir) --- satellit_installer/includes/00-variables.inc | 2 +- satellit_installer/includes/90-set_directory_permissions.inc | 6 +++--- satellit_upgrader/updater.template.sh | 10 ++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/satellit_installer/includes/00-variables.inc b/satellit_installer/includes/00-variables.inc index 20e4b1d..61c2a5f 100644 --- a/satellit_installer/includes/00-variables.inc +++ b/satellit_installer/includes/00-variables.inc @@ -26,7 +26,7 @@ PACKAGELIST_SERVER=" sudo php-common php-mysqlnd php-cli nfs-kernel-server curl nfs-common libowfat0 ldap-utils vim gcc make unattended-upgrades gnupg libowfat-dev libssl-dev gcc make liblzma-dev tftpd-hpa tmate php-xml net-tools - libjansson4 php-soap + libjansson4 php-soap mtools " # Enter here packages needing installation of recommended packages as determines by apt-get: diff --git a/satellit_installer/includes/90-set_directory_permissions.inc b/satellit_installer/includes/90-set_directory_permissions.inc index f40322b..2bb977b 100644 --- a/satellit_installer/includes/90-set_directory_permissions.inc +++ b/satellit_installer/includes/90-set_directory_permissions.inc @@ -29,9 +29,9 @@ set_directory_permissions() { chmod 755 "$WWWDIR" 2>/dev/null # if already there chown -R www-data:taskmanager "$WWWDIR" - mkdir -p "$WWWDIR/boot" - chown -R taskmanager:www-data "$WWWDIR"/boot 2>/dev/null - chmod 755 "$WWWDIR"/boot 2>/dev/null + mkdir -p "$WWWDIR/boot/download" + chown -R taskmanager:www-data "$WWWDIR/boot" + chmod 755 "$WWWDIR/boot" "$WWWDIR/boot/download" chown -R taskmanager: "$TFTPDIR" diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh index 16d166b..b51a0f4 100644 --- a/satellit_upgrader/updater.template.sh +++ b/satellit_upgrader/updater.template.sh @@ -209,6 +209,8 @@ if [ -n "$TGZ_TASKMANAGER" ]; then tar -x -C "$PATH_TASKMANAGER" -f "$TMPDIR/$TGZ_TASKMANAGER" fixperms "$PATH_TASKMANAGER" root:root chmod -R a+x "$PATH_TASKMANAGER/scripts" + mkdir -p -m 0755 "/srv/openslx/www/boot/download" + fixperms "/srv/openslx/www/boot/download" taskmanager:www-data echo "Restarting service" restart_service taskmanager echo "Taskmanager upgrade complete" @@ -238,6 +240,10 @@ if [ -n "$TGZ_IPXE" ]; then } & IPXE_PID=$! fi +# Need mtools +if ! which mformat &>/dev/null; then + failprint apt-get install -y mtools +fi # ************************** SLX-Admin ********************* if [ -n "$TGZ_SLXADMIN" ]; then @@ -425,6 +431,10 @@ echo "* TFTP" # ************************** TFTP ************************** if [ -n "$TGZ_TFTP" ]; then + # TODO: + # ipxelinux.0 -> undionly.kkkpxe + # Convert & Remove other menus + # Redirect 2x lighttpd [ -e "$TMPDIR/$TGZ_TFTP" ] || perror "$TGZ_TFTP missing from payload" echo "Extracting tftp server dir contents" rm -rf -- "$PATH_TFTP/v4" "$PATH_TFTP/v6" "$PATH_TFTP/ipxelinux.0" "$PATH_TFTP/pxelinux.0" -- cgit v1.2.3-55-g7522