summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader/pack-update.sh
diff options
context:
space:
mode:
authorSimon Rettberg2016-02-11 17:39:32 +0100
committerSimon Rettberg2016-02-11 17:39:32 +0100
commit30b9046e1c77f67187c7d6ac05e921eeef32e495 (patch)
tree727e250d81fab7b30ab693521431630336dee0ac /satellit_upgrader/pack-update.sh
parent[SSPS] atftpd.service: More agressive start/stop timeout (diff)
downloadsetup-scripts-30b9046e1c77f67187c7d6ac05e921eeef32e495.tar.gz
setup-scripts-30b9046e1c77f67187c7d6ac05e921eeef32e495.tar.xz
setup-scripts-30b9046e1c77f67187c7d6ac05e921eeef32e495.zip
[SSUS] Call me v1.0-RC1
Diffstat (limited to 'satellit_upgrader/pack-update.sh')
-rwxr-xr-xsatellit_upgrader/pack-update.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/satellit_upgrader/pack-update.sh b/satellit_upgrader/pack-update.sh
index 15d64ca..f8efd73 100755
--- a/satellit_upgrader/pack-update.sh
+++ b/satellit_upgrader/pack-update.sh
@@ -24,7 +24,8 @@ declare -rg UPDATER="updater.sh"
declare -rg TGZ_SLXADMIN="files/slx-admin.tar.gz"
declare -rg TGZ_DOZMOD="files/dozmod.tar.gz"
declare -rg TGZ_TASKMANAGER="files/taskmanager.tar.gz"
-declare -rg TGZ_TFTP="files/syslinux.tar.gz"
+declare -rg TGZ_TFTP="files/tftpdir.tar.gz"
+declare -rg TGZ_LDADP="files/ldadp.tar.gz"
cp "updater.template.sh" "$UPDATER" || perror "could not copy template"
chmod +x "$UPDATER"
@@ -42,6 +43,20 @@ addpayload () {
fi
}
+addinstallfile () {
+ echo -n "Includes $1: "
+ local FILENAME=$1
+ if [ ! -d "../satellit_installer" ]; then
+ echo "no (satellit_installer not found)"
+ elif [ ! -e "../satellit_installer/static_files/$1" ]; then
+ echo "no (file not found in satellit_installer/static_files)"
+ elif cp "../satellit_installer/static_files/$1" "files/$1"; then
+ echo "yes"
+ else
+ echo "...no! (copy failed)"
+ fi
+}
+
# Replace variables
# slxadmin version
echo -n "Includes SLX-Admin: "
@@ -60,6 +75,9 @@ fi
addpayload "TGZ_DOZMOD" "Dozmod server"
addpayload "TGZ_TASKMANAGER" "Taskmanager"
addpayload "TGZ_TFTP" "TFTP/PxeLinux data"
+addpayload "TGZ_LDADP" "ldap/ad proxy"
+
+addinstallfile "atftpd.service"
# Last patch: Payload offset
# Calc payload offset, which is tricky as the size changes as we patch
@@ -68,5 +86,7 @@ SIZE=$(( ( $SIZE / 1024 ) * 1024 + 1024 ))
sed -i "s/%PAYLOAD_OFFSET%/${SIZE}/" "$UPDATER" || perror "could not patch payload variable in updater"
# Truncate, append payload
truncate --size="$SIZE" "$UPDATER" || perror "Could not truncate updater to $SIZE bytes"
+echo "Appending tar payload to final updater..."
tar ckz files/* >> "$UPDATER" || perror "Could not append payload to updater"
+echo "..done"