You've already forked dts-scripts
mirror of
https://github.com/Dasharo/dts-scripts.git
synced 2026-03-06 15:01:22 -08:00
Cause of this patch: After I have added and integrated HAL - I have
added following line in dts-boot:
source $DTS_HAL
This was needed because I have used some fuctions from the HAL in the
script.
Inside DTS_HAL I had following line:
source $DTS_ENV
Because I have used some vars from the DTS_ENV in the HAL.
The problem was, that I had another line in DTS_ENV:
source $DTS_HAL
So, I got following boot workflow:
Boot
|
v
dts-boot
| /-------\
v v |
DTS_HAL->DTS_ENV
.
............
v
dts
Instead of sourcing some scripts and then launching dts script - I got a
loop betwee DTS_HAL and DTS_ENV. Therefore I decided to clean up
sourcing a bit.
Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com>
30 lines
840 B
Bash
30 lines
840 B
Bash
#!/bin/bash
|
|
|
|
# SPDX-FileCopyrightText: 2024 3mdeb <contact@3mdeb.com>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
SBIN_DIR="/usr/sbin"
|
|
BIN_DIR="/usr/bin"
|
|
FUM_EFIVAR="/sys/firmware/efi/efivars/FirmwareUpdateMode-d15b327e-ff2d-4fc1-abf6-c12bd08c1359"
|
|
|
|
export DTS_FUNCS="$SBIN_DIR/dts-functions.sh"
|
|
export DTS_ENV="$SBIN_DIR/dts-environment.sh"
|
|
export DTS_SUBS="$SBIN_DIR/dts-subscription.sh"
|
|
export DTS_HAL="$SBIN_DIR/dts-hal.sh"
|
|
export DTS_MOCK_COMMON="$SBIN_DIR/common-mock-func.sh"
|
|
export DTS_LOG_FILE="/tmp/dts.log"
|
|
|
|
# shellcheck source=../include/dts-environment.sh
|
|
source $DTS_ENV
|
|
# shellcheck source=../include/dts-functions.sh
|
|
source $DTS_FUNCS
|
|
# shellcheck source=../include/hal/dts-hal.sh
|
|
source $DTS_HAL
|
|
|
|
if [ -f $FUM_EFIVAR ]; then
|
|
$SBIN_DIR/dasharo-deploy update fum
|
|
else
|
|
$BIN_DIR/script -c $SBIN_DIR/dts "$DTS_LOG_FILE"
|
|
fi
|