pxe: .env generated once from example file
This commit is contained in:
parent
e8b1d62290
commit
da7b78eae3
|
@ -132,11 +132,10 @@ init_config() {
|
||||||
|
|
||||||
PXE_DIR="$(pwd)"
|
PXE_DIR="$(pwd)"
|
||||||
|
|
||||||
if [ -f ./.env ]; then
|
if [ ! -f ./.env ]; then
|
||||||
. ./.env
|
echo "WARNING: .env was not there, .env.example was copied, this only happens once"
|
||||||
else
|
|
||||||
echo "PXE: WARNING: $(pwd)/.env does not exist yet, cannot read config from there. You can take inspiration with file $(pwd)/.env.example"
|
|
||||||
fi
|
fi
|
||||||
|
. ./.env
|
||||||
VERSION_CODENAME="${VERSION_CODENAME:-bookworm}"
|
VERSION_CODENAME="${VERSION_CODENAME:-bookworm}"
|
||||||
tftp_path="${tftp_path:-/srv/pxe-tftp}"
|
tftp_path="${tftp_path:-/srv/pxe-tftp}"
|
||||||
# vars used in envsubst require to be exported:
|
# vars used in envsubst require to be exported:
|
||||||
|
|
Loading…
Reference in New Issue