Verified Commit 43b75d63 authored by Karel Koci's avatar Karel Koci 🤘 Committed by Josef Schlehofer
Browse files

generate_medkits: include initial-config in most of the medkits

The medkits we do not need nor want initial-config in is minimal one (as
that should be the minimal system) and netboot (as that is configured
trough netboot scripts). Any other medkit now should include
initial-config.
parent 4a06059d
Pipeline #79332 passed with stages
in 29 minutes and 56 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"
......
......@@ -105,7 +105,7 @@ if env_testkey and env_testkey ~= "" then
end
local env_testkey = os.getenv('BOOTSTRAP_INITIAL_CONFIG')
if env_testkey and env_testkey ~= "" then
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