From 3100a42d8b06acc5e9778a366226903157a31eec Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 16 Jan 2017 15:29:07 +0100 Subject: [SSUS] Add lean mode that excludes static files --- satellit_upgrader/pack-update.sh | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'satellit_upgrader/pack-update.sh') diff --git a/satellit_upgrader/pack-update.sh b/satellit_upgrader/pack-update.sh index 32a6fe4..a3ae632 100755 --- a/satellit_upgrader/pack-update.sh +++ b/satellit_upgrader/pack-update.sh @@ -30,6 +30,19 @@ declare -rg TGZ_LDADP="files/ldadp.tar.gz" cp "updater.template.sh" "$UPDATER" || perror "could not copy template" chmod +x "$UPDATER" +LEAN= +while true; do + case "$1" in + --lean|-l) + LEAN=true + ;; + *) + break + ;; + esac + shift +done + # Prepare source directory declare -rg SRCDIR=$1 if [ -z "$SRCDIR" ]; then @@ -100,14 +113,15 @@ addpayload "TGZ_TFTP" "TFTP/PxeLinux data" addpayload "TGZ_IPXE" "iPXE source code" addpayload "TGZ_LDADP" "ldap/ad proxy" -addinstallfile "atftpd.service" -addinstallfile "lighttpd.conf" -addinstallfile "slxadmin-config.php" -addinstallfile "patch_lighttpd_phpchildren" - -# TODO: Unify more -source ../satellit_installer/includes/10-sudo_config.inc -sudo_config files/tm-sudo-config +if [ -z "$LEAN" ]; then + addinstallfile "atftpd.service" + addinstallfile "lighttpd.conf" + addinstallfile "slxadmin-config.php" + addinstallfile "patch_lighttpd_phpchildren" + # TODO: Unify more + source ../satellit_installer/includes/10-sudo_config.inc + sudo_config files/tm-sudo-config +fi # Last patch: Payload offset # Calc payload offset, which is tricky as the size changes as we patch -- cgit v1.2.3-55-g7522