Compare commits

...

3 Commits

Author SHA1 Message Date
pedro c2848c265a pxe: simplify with cp 2024-09-25 13:40:57 -03:00
pedro 4bdc55b46d deploy-workbench: detect nfs env 2024-09-25 13:40:00 -03:00
pedro 10e99fdcab pxe: rsync to copy squashfs 2024-09-25 13:39:54 -03:00
2 changed files with 10 additions and 4 deletions

View File

@ -269,7 +269,13 @@ stty -echo # Do not show what we type in terminal so it does not meddle with our
dmesg -n 1 # Do not report *useless* system messages to the terminal
# clearly specify the right working directory, used in the python script as os.getcwd()
cd /mnt
pipenv run python /opt/workbench/workbench-script.py --config "/mnt/settings/settings.ini"
# detect pxe env
if [ -d /run/live/medium ]; then
config_path='/run/live/medium/settings.ini'
else
config_path='/mnt/settings.ini'
fi
pipenv run python /opt/workbench/workbench-script.py --config "\${config_path}"
stty echo
END
#TODO add some useful commands

View File

@ -10,7 +10,7 @@ set -x
install_dependencies() {
apt update
apt install -y wget dnsmasq nfs-kernel-server
apt install -y wget dnsmasq nfs-kernel-server rsync
}
backup_file() {
@ -32,7 +32,7 @@ END
if [ ! -f "${nfs_path}/settings.ini" ]; then
if [ -f "settings.ini" ]; then
ln -sfv "$(pwd)/settings.ini"" ${nfs_path}/settings.ini"
cp settings.ini "${nfs_path}/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
@ -56,7 +56,7 @@ END
extract_live_parts_for_tftp() {
cp -fv "${PXE_DIR}/../iso/staging/live/vmlinuz" "${tftp_path}/"
cp -fv "${PXE_DIR}/../iso/staging/live/initrd" "${tftp_path}/"
ln -sfv "${nfs_path}/live/" "${PXE_DIR}/../iso/staging/live/filesystem.squashfs"
rsync -av "${PXE_DIR}/../iso/staging/live/filesystem.squashfs" "${nfs_path}/live/"
}
install_netboot() {