summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2023-10-23 12:15:49 +0200
committerSimon Rettberg2023-10-23 12:15:49 +0200
commitefcd264ca0a4407de438e861311c62357785dc5c (patch)
tree5db55223f51fedbb98348430202ef98c1e8f8983
parent[SSPS] Fix patching slx-admin config on firstboot (diff)
downloadsetup-scripts-efcd264ca0a4407de438e861311c62357785dc5c.tar.gz
setup-scripts-efcd264ca0a4407de438e861311c62357785dc5c.tar.xz
setup-scripts-efcd264ca0a4407de438e861311c62357785dc5c.zip
[SSPS] install packages: Validate argument
-rw-r--r--satellit_installer/includes/10-install_packages.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/satellit_installer/includes/10-install_packages.inc b/satellit_installer/includes/10-install_packages.inc
index 0d96cfa..50e9572 100644
--- a/satellit_installer/includes/10-install_packages.inc
+++ b/satellit_installer/includes/10-install_packages.inc
@@ -23,9 +23,11 @@ install_packages() {
echo "#"
case "$1" in
- NOREC) INSTALLOPTIONS="-qq -y --no-install-recommends"
+ NOREC) INSTALLOPTIONS="-qq -y --no-install-recommends"
;;
- RECOM) INSTALLOPTIONS="-qq -y"
+ RECOM) INSTALLOPTIONS="-qq -y"
+ ;;
+ *) perror "Invalid install_packages mode: $1"
;;
esac
install_package $NEEDED_PACKAGES # No quotes
@@ -36,7 +38,7 @@ install_files() {
local dir="${BASEDIR}/static_files/${1}"
[ -d "$dir" ] || perror "static files for module $1 not found"
tar -cpP --owner=root --group=root --transform "s,^\(./\)*${dir}/*,," "$dir" | tar -xp -C /
- local ps=( ${PIPESTATUS[*]} )
+ local ps=( "${PIPESTATUS[@]}" )
[ "${ps[0]}" != 0 ] && perror "tarcopy: Read failed"
[ "${ps[1]}" != 0 ] && perror "tarcopy: Write failed"
return 0