Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/hooks/archiso_pxe_nbd
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/archiso_pxe_nbd')
-rw-r--r--hooks/archiso_pxe_nbd11
1 files changed, 7 insertions, 4 deletions
diff --git a/hooks/archiso_pxe_nbd b/hooks/archiso_pxe_nbd
index d9bc6d8..fdb2c2b 100644
--- a/hooks/archiso_pxe_nbd
+++ b/hooks/archiso_pxe_nbd
@@ -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}
- msg ":: Disconnect NBD from ${archiso_nbd_srv} at /dev/nbd0"
- nbd-client -d /dev/nbd0
+ if [[ "${copytoram}" == "y" ]]; then
+ msg ":: Disconnect NBD from ${archiso_nbd_srv} at /dev/nbd0"
+ nbd-client -d /dev/nbd0
+ fi
}