Verified Commit 0f8f9219 authored by Josef Schlehofer's avatar Josef Schlehofer 💬
Browse files

Merge branch 'hotfix/bootstrap-initial-config' into hbl

parents 8d22521a 43b75d63
Pipeline #79333 passed with stages
in 26 minutes and 59 seconds
......@@ -117,18 +117,18 @@ generate() {
get_usign
generate "medkit"
generate "medkit" --initial-config
generate "medkit-min" --base "base-min" --lists "" --localization ""
case "$board" in
omnia)
generate "medkit-contract-cti" --contract "cti"
generate "medkit-contract-cti" --contract "cti" --initial-config
;;
mox)
generate "netboot" --base "base-netboot"
generate "medkit-contract-shield" --contract "shield"
generate "medkit-contract-shield" --contract "shield" --initial-config
;;
esac
if [ "$board" != "turris1x" ]; then
generate "medkit-contract-cznic" --contract "cznic"
generate "medkit-contract-cznic" --contract "cznic" --initial-config
fi
......@@ -33,6 +33,7 @@ export UPDATER_SCRIPT=
export OVERLAY=
export OUTPUT=
export BOOTSTRAP_TESTKEY=
export BOOTSTRAP_INITIAL_CONFIG=
export TURRIS_BUILD_DIR="$src_dir"
......@@ -86,6 +87,10 @@ while [ $# -gt 0 ]; do
echo " first system update."
echo " --contract CONTRACT"
echo " Build medkit for router under CONTRACT."
echo " --initial-config"
echo " Include package initial-config in to the medkit. This package"
echo " can be used to configure Wi-Fi and system passwords with"
echo " configuration file stored on drive connected to router."
echo " --updater-script FILE"
echo " Run file as updater's script. It is executed after primary"
echo " entry script of this tool."
......@@ -133,6 +138,9 @@ while [ $# -gt 0 ]; do
BOOTSTRAP_CONTRACT="$1"
default_output_ext="-contract-$1"
;;
--initial-config)
BOOTSTRAP_INITIAL_CONFIG="y"
;;
--updater-script)
shift
UPDATER_SCRIPT="$1"
......
......@@ -16,6 +16,8 @@ This script expects following variables to be possibly defined in environment:
standard medkits
BOOTSTRAP_TESTKEY: if defined non-empty then test kyes are included in
installation
BOOTSTRAP_INITIAL_CONFIG: if defined non-empty then package initial-config is
included.
]]
-- Sanity checks
......@@ -101,3 +103,9 @@ local env_testkey = os.getenv('BOOTSTRAP_TESTKEY')
if env_testkey and env_testkey ~= "" then
Install('cznic-repo-keys-test')
end
local env_initial_config = os.getenv('BOOTSTRAP_INITIAL_CONFIG')
if env_initial_config and env_initial_config ~= "" then
Install('initial-config')
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment