fix NBD boot without copy-to-ram

Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
Christian Hesse 2016-05-24 12:02:42 +02:00 committed by Gerardo Exequiel Pozzi
parent 091e40e3c9
commit ca85896bfc

View File

@ -25,16 +25,19 @@ archiso_pxe_nbd_mount_handler () {
done
msg ":: Setup NBD from ${archiso_nbd_srv} at /dev/nbd0"
nbd-client ${archiso_nbd_srv} -N ${archiso_nbd_name} /dev/nbd0
if [[ "${copytoram}" != "n" ]]; then
nbd-client ${archiso_nbd_srv} -N ${archiso_nbd_name} /dev/nbd0
copytoram="y"
else
nbd-client ${archiso_nbd_srv} -N ${archiso_nbd_name} -systemd-mark -persist /dev/nbd0
fi
archisodevice=/dev/nbd0
archiso_mount_handler ${newroot}
if [[ "${copytoram}" == "y" ]]; then
msg ":: Disconnect NBD from ${archiso_nbd_srv} at /dev/nbd0"
nbd-client -d /dev/nbd0
fi
}