pxe: simplify a lot the extraction of live parts
This commit is contained in:
parent
fd411c535f
commit
2ecd3d4537
|
@ -32,7 +32,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
|
||||||
ln -sv "$(pwd)/settings.ini"" ${nfs_path}/settings.ini"
|
ln -sfv "$(pwd)/settings.ini"" ${nfs_path}/settings.ini"
|
||||||
else
|
else
|
||||||
echo "ERROR: ../settings.ini does not exist yet, cannot read config from there. You can take inspiration with file ../settings.ini.example"
|
echo "ERROR: ../settings.ini does not exist yet, cannot read config from there. You can take inspiration with file ../settings.ini.example"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -54,20 +54,9 @@ END
|
||||||
}
|
}
|
||||||
|
|
||||||
extract_live_parts_for_tftp() {
|
extract_live_parts_for_tftp() {
|
||||||
# this is slow, so it is not enforced, reboot or remove the
|
ln -sfv "$(pwd)/../iso/staging/live/filesystem.squashfs" "${nfs_path}/live/"
|
||||||
# file to redownload the live iso
|
ln -sfv "$(pwd)/../iso/staging/live/vmlinuz" "${tftp_path}/"
|
||||||
if [ ! -f /tmp/live.iso ]; then
|
ln -sfv "$(pwd)/../iso/staging/live/initrd.img" "${tftp_path}/"
|
||||||
# src https://www.debian.org/CD/faq/#newest
|
|
||||||
DEBIAN_VERSION="$(wget https://www.debian.org/CD/ -O- \
|
|
||||||
| grep -o '<strong>[0-9.]*</strong>' \
|
|
||||||
| grep -o '[0-9.]*')"
|
|
||||||
url="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-${DEBIAN_VERSION}-amd64-standard.iso"
|
|
||||||
wget "${url}" -O /tmp/live.iso
|
|
||||||
fi
|
|
||||||
mount -o loop /tmp/live.iso /mnt/
|
|
||||||
cp /mnt/live/vmlinuz "${tftp_path}/"
|
|
||||||
cp /mnt/live/initrd.img "${tftp_path}/"
|
|
||||||
umount /mnt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_netboot() {
|
install_netboot() {
|
||||||
|
|
Loading…
Reference in New Issue