Compare commits
9 commits
4069de095a
...
c1867d1ce3
Author | SHA1 | Date | |
---|---|---|---|
c1867d1ce3 | |||
8ac0da99fe | |||
Cayo Puigdefabregas | 71e06b13a4 | ||
Cayo Puigdefabregas | 82f93a9446 | ||
Cayo Puigdefabregas | b1136e3dd8 | ||
af780b1247 | |||
da7b78eae3 | |||
e8b1d62290 | |||
3e5e151bef |
4
Makefile
4
Makefile
|
@ -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 \
|
-drive file=deploy/iso/workbench_debug.iso,cache=none,if=virtio,format=raw,index=0,media=disk \
|
||||||
-boot menu=on
|
-boot menu=on
|
||||||
|
|
||||||
|
es_gen:
|
||||||
|
$(MAKE) es_gen_po
|
||||||
|
$(MAKE) es_gen_mo
|
||||||
|
|
||||||
es_gen_po:
|
es_gen_po:
|
||||||
cp locale/es/LC_MESSAGES/messages.po locale/es/LC_MESSAGES/messages.pot.bak
|
cp locale/es/LC_MESSAGES/messages.po locale/es/LC_MESSAGES/messages.pot.bak
|
||||||
pygettext3 -p locale/es/LC_MESSAGES/ workbench-script.py
|
pygettext3 -p locale/es/LC_MESSAGES/ workbench-script.py
|
||||||
|
|
|
@ -199,12 +199,12 @@ create_persistence_partition() {
|
||||||
mkdir -p "${tmp_rw_mount}"
|
mkdir -p "${tmp_rw_mount}"
|
||||||
${SUDO} mount "$(pwd)/${rw_img_path}" "${tmp_rw_mount}"
|
${SUDO} mount "$(pwd)/${rw_img_path}" "${tmp_rw_mount}"
|
||||||
${SUDO} mkdir -p "${tmp_rw_mount}"
|
${SUDO} mkdir -p "${tmp_rw_mount}"
|
||||||
if [ -f "settings.ini" ]; then
|
if [ ! -f "settings.ini" ]; then
|
||||||
${SUDO} cp -v settings.ini "${tmp_rw_mount}/settings.ini"
|
${SUDO} cp -v settings.ini.example settings.ini
|
||||||
else
|
echo "WARNING: settings.ini was not there, settings.ini.example was copied, this only happens once"
|
||||||
echo "ERROR: settings.ini does not exist yet, cannot read config from there. You can take inspiration with file settings.ini.example"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
${SUDO} cp -v settings.ini "${tmp_rw_mount}/settings.ini"
|
||||||
|
|
||||||
${SUDO} umount "${tmp_rw_mount}"
|
${SUDO} umount "${tmp_rw_mount}"
|
||||||
|
|
||||||
uuid="$(blkid "${rw_img_path}" | awk '{ print $3; }')"
|
uuid="$(blkid "${rw_img_path}" | awk '{ print $3; }')"
|
||||||
|
@ -280,7 +280,7 @@ if [ "\${nfs_host}" ]; then
|
||||||
mount --bind /run/live/medium /mnt
|
mount --bind /run/live/medium /mnt
|
||||||
# debian live nfs path is readonly, do a trick
|
# debian live nfs path is readonly, do a trick
|
||||||
# to make snapshots subdir readwrite
|
# 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
|
# reload mounts on systemd
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -37,7 +37,7 @@ backup_file() {
|
||||||
|
|
||||||
if [ -f "${target}" ]; then
|
if [ -f "${target}" ]; then
|
||||||
if ! grep -q 'we should do a backup' "${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
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ END
|
||||||
|
|
||||||
if [ ! -f "${nfs_path}/settings.ini" ]; then
|
if [ ! -f "${nfs_path}/settings.ini" ]; then
|
||||||
if [ -f "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
|
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"
|
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
|
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/vmlinuz" "${tftp_path}/"
|
||||||
${SUDO} cp -fv "${PXE_DIR}/../iso/staging/live/initrd" "${tftp_path}/"
|
${SUDO} cp -fv "${PXE_DIR}/../iso/staging/live/initrd" "${tftp_path}/"
|
||||||
|
|
||||||
${SUDO} cp /usr/lib/syslinux/memdisk "${tftp_path}/"
|
${SUDO} cp -v /usr/lib/syslinux/memdisk "${tftp_path}/"
|
||||||
${SUDO} cp /usr/lib/syslinux/modules/bios/* "${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"
|
envsubst < ./pxe-menu.cfg | ${SUDO} tee "${tftp_path}/pxelinux.cfg/default"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -128,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 a new issue