Corrections for PXE boot (#266)

* Correction for a faulty condition

The current condition works for checking existence of the .sfs files on the local file system.
The proposed condition checks for the existence of the .sfs files on a remote server.

* Correction for NFS & NBD & HTTP boot

By default, Calamares searches for the .sfs files in the "bootmnt" directory.
When "copytoram==y" (relevant for NFS & NBD & HTTP boot), the .sfs files are stored in the "copytoram" directory.
The proposed code binds the "copytoram" dir with "bootmnt" so Calamares can "see" the .sfs. files.
This commit is contained in:
elishl 2017-05-06 15:38:13 +03:00 committed by Philip
parent 7caeeb9638
commit 251f56befd
2 changed files with 3 additions and 1 deletions

View file

@ -237,6 +237,8 @@ miso_mount_handler() {
if [[ "${copytoram}" == "y" ]]; then
umount -d /run/miso/bootmnt
mkdir -p /run/miso/bootmnt/${misobasedir}/${arch}
mount -o bind /run/miso/copytoram /run/miso/bootmnt/${misobasedir}/${arch}
fi
}

View file

@ -41,7 +41,7 @@ miso_pxe_http_mount_handler () {
local _src=${miso_http_srv}${misobasedir}/${arch}
for sfs in livefs mhwdfs desktopfs rootfs;do
if [[ -f "${_src}/${sfs}.sfs" ]]; then
if [[ ! -z "$( curl -s --head "${_src}/${sfs}.sfs" | grep "OK" )" ]]; then
_curl_get "${_src}/${sfs}.sfs" "/${arch}"
if [[ "${checksum}" == "y" ]]; then