Compare commits

..

9 Commits

Author SHA1 Message Date
pedro c1867d1ce3 add es translations to new logs 2024-11-08 18:27:44 +01:00
pedro 8ac0da99fe wb.py: improved error msgs when sending to URL 2024-11-08 18:27:44 +01:00
Cayo Puigdefabregas 71e06b13a4 fix process for show qr 2024-11-08 18:27:44 +01:00
Cayo Puigdefabregas 82f93a9446 fix legacy case 2024-11-08 18:27:44 +01:00
Cayo Puigdefabregas b1136e3dd8 issue 100 new url in qr for evidence instead of device 2024-11-08 18:27:44 +01:00
pedro af780b1247 Makefile: even easier generate translations 2024-11-08 18:27:24 +01:00
pedro da7b78eae3 pxe: .env generated once from example file 2024-11-08 18:20:47 +01:00
pedro e8b1d62290 change strategy on example files (added -v to cps)
- if it does not exist, copy once from example
- added -v flag to cps that did not have it
2024-11-06 19:31:44 +01:00
pedro 3e5e151bef make nfs mount verbose
related to #4
2024-11-05 04:49:09 +01:00
3 changed files with 21 additions and 14 deletions

View File

@ -44,6 +44,10 @@ boot_iso_uefi_secureboot:
-drive file=deploy/iso/workbench_debug.iso,cache=none,if=virtio,format=raw,index=0,media=disk \
-boot menu=on
es_gen:
$(MAKE) es_gen_po
$(MAKE) es_gen_mo
es_gen_po:
cp locale/es/LC_MESSAGES/messages.po locale/es/LC_MESSAGES/messages.pot.bak
pygettext3 -p locale/es/LC_MESSAGES/ workbench-script.py

View File

@ -199,12 +199,12 @@ create_persistence_partition() {
mkdir -p "${tmp_rw_mount}"
${SUDO} mount "$(pwd)/${rw_img_path}" "${tmp_rw_mount}"
${SUDO} mkdir -p "${tmp_rw_mount}"
if [ -f "settings.ini" ]; then
${SUDO} cp -v settings.ini "${tmp_rw_mount}/settings.ini"
else
echo "ERROR: settings.ini does not exist yet, cannot read config from there. You can take inspiration with file settings.ini.example"
exit 1
if [ ! -f "settings.ini" ]; then
${SUDO} cp -v settings.ini.example settings.ini
echo "WARNING: settings.ini was not there, settings.ini.example was copied, this only happens once"
fi
${SUDO} cp -v settings.ini "${tmp_rw_mount}/settings.ini"
${SUDO} umount "${tmp_rw_mount}"
uuid="$(blkid "${rw_img_path}" | awk '{ print $3; }')"
@ -280,7 +280,7 @@ if [ "\${nfs_host}" ]; then
mount --bind /run/live/medium /mnt
# debian live nfs path is readonly, do a trick
# to make snapshots subdir readwrite
mount \${nfs_host}:/snapshots /run/live/medium/snapshots
mount -v \${nfs_host}:/snapshots /run/live/medium/snapshots
# reload mounts on systemd
systemctl daemon-reload
fi

View File

@ -37,7 +37,7 @@ backup_file() {
if [ -f "${target}" ]; then
if ! grep -q 'we should do a backup' "${target}"; then
${SUDO} cp -a "${target}" "${target}-bak_${ts}"
${SUDO} cp -v -a "${target}" "${target}-bak_${ts}"
fi
fi
}
@ -72,7 +72,7 @@ END
if [ ! -f "${nfs_path}/settings.ini" ]; then
if [ -f "settings.ini" ]; then
${SUDO} cp settings.ini "${nfs_path}/settings.ini"
${SUDO} cp -v settings.ini "${nfs_path}/settings.ini"
else
echo "ERROR: $(pwd)/settings.ini does not exist yet, cannot read config from there. You can take inspiration with file $(pwd)/settings.ini.example"
exit 1
@ -110,8 +110,12 @@ install_netboot() {
${SUDO} cp -fv "${PXE_DIR}/../iso/staging/live/vmlinuz" "${tftp_path}/"
${SUDO} cp -fv "${PXE_DIR}/../iso/staging/live/initrd" "${tftp_path}/"
${SUDO} cp /usr/lib/syslinux/memdisk "${tftp_path}/"
${SUDO} cp /usr/lib/syslinux/modules/bios/* "${tftp_path}/"
${SUDO} cp -v /usr/lib/syslinux/memdisk "${tftp_path}/"
${SUDO} cp -v /usr/lib/syslinux/modules/bios/* "${tftp_path}/"
if [ ! -f ./pxe-menu.cfg ]; then
${SUDO} cp -v ./pxe-menu.cfg.example pxe-menu.cfg
echo "WARNING: pxe-menu.cfg was not there, pxe-menu.cfg.example was copied, this only happens once"
fi
envsubst < ./pxe-menu.cfg | ${SUDO} tee "${tftp_path}/pxelinux.cfg/default"
fi
@ -128,11 +132,10 @@ init_config() {
PXE_DIR="$(pwd)"
if [ -f ./.env ]; then
. ./.env
else
echo "PXE: WARNING: $(pwd)/.env does not exist yet, cannot read config from there. You can take inspiration with file $(pwd)/.env.example"
if [ ! -f ./.env ]; then
echo "WARNING: .env was not there, .env.example was copied, this only happens once"
fi
. ./.env
VERSION_CODENAME="${VERSION_CODENAME:-bookworm}"
tftp_path="${tftp_path:-/srv/pxe-tftp}"
# vars used in envsubst require to be exported: