From 1716958a8dd4b52b1d437a29d268c949b83767c0 Mon Sep 17 00:00:00 2001 From: Lyndon Brown Date: Wed, 1 Apr 2020 02:19:43 +0100 Subject: [PATCH] bootstrap_cache: validate action param --- scripts/build/bootstrap_cache | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/build/bootstrap_cache b/scripts/build/bootstrap_cache index 0338c9ef4..b9894fed8 100755 --- a/scripts/build/bootstrap_cache +++ b/scripts/build/bootstrap_cache @@ -24,14 +24,18 @@ Init_config_data "${@}" # Check architecture Check_crossarchitectures -if ! In_list "bootstrap" ${LB_CACHE_STAGES} -then +if ! In_list "bootstrap" ${LB_CACHE_STAGES}; then exit 0 fi _ACTION="${1}" shift +if ! In_list "${_ACTION}" restore save; then + Echo_error "Invalid action parameter" + exit 1 +fi + # Set non-default stage file name # Note, this (plus the applicable extension added below) must match that used in `bootstrap_debootstrap` STAGE_FILE="bootstrap_cache.${_ACTION}"