Skip to content

Commit 3a72a6c

Browse files
mwasilewroxell
authored andcommitted
automated: linux: fix factory-reset test
Auto-registration script changed and this patch is required to fix the test. From now on it is possible to set device tag using a file /etc/sota/tag. Auto-registration script will pick the tag from there and populate it to aktualizr-lite settings. Signed-off-by: Milosz Wasilewski <milosz.wasilewski@foundries.io>
1 parent 4fc8e57 commit 3a72a6c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

automated/linux/factory-reset/prepare-reset.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export RESULT_FILE
1010
TYPE="factory_reset"
1111
ADDITIONAL_TYPE=""
1212
LABEL=""
13-
SOTA_CONFDIR="/etc/sota/conf.d"
13+
SOTA_DIR="/etc/sota"
14+
SOTA_CONFDIR="${SOTA_DIR}/conf.d"
1415
HSM_MODULE=""
1516

1617
usage() {
@@ -60,8 +61,9 @@ mkdir -p "${SOTA_CONFDIR}"
6061
cp z-99-aklite-callback.toml "${SOTA_CONFDIR}"
6162
cp z-99-aklite-disable-reboot.toml "${SOTA_CONFDIR}"
6263
if [ -n "${LABEL}" ]; then
63-
echo "[pacman]" > "${SOTA_CONFDIR}"/z-99-aklite-tag.toml
64-
echo "tags = ${LABEL}" >> "${SOTA_CONFDIR}"/z-99-aklite-tag.toml
64+
# tag will be applied to aklite settings
65+
# from auto-registration script
66+
echo "${LABEL}" > "${SOTA_DIR}/tag"
6567
fi
6668
if [ -n "${HSM_MODULE}" ]; then
6769
echo "HSM_MODULE=\"${HSM_MODULE}\"" > /etc/sota/hsm

0 commit comments

Comments
 (0)