summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader/pack-update.sh
diff options
context:
space:
mode:
authorSimon Rettberg2017-01-16 15:29:07 +0100
committerSimon Rettberg2017-01-16 15:29:07 +0100
commit3100a42d8b06acc5e9778a366226903157a31eec (patch)
tree9fa607420564eb75b86bc81df86dc5ab00eb8809 /satellit_upgrader/pack-update.sh
parentMerge branch 'master' of git.openslx.org:bwlp/setup-scripts (diff)
downloadsetup-scripts-3100a42d8b06acc5e9778a366226903157a31eec.tar.gz
setup-scripts-3100a42d8b06acc5e9778a366226903157a31eec.tar.xz
setup-scripts-3100a42d8b06acc5e9778a366226903157a31eec.zip
[SSUS] Add lean mode that excludes static files
Diffstat (limited to 'satellit_upgrader/pack-update.sh')
-rwxr-xr-xsatellit_upgrader/pack-update.sh30
1 files changed, 22 insertions, 8 deletions
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