[archiso] Update nbd hook to match newer nbd operation mode.

Newer nbd-server uses config file instead of parameters via cmd line (deprecated).
Also does not use a fixed port (oldstyle).

Sample nbd-server.conf that works with this change:

-- CUT HERE --
[generic]
[archiso]
    readonly = true
    exportname = /tmp/archlinux.iso
-- CUT HERE --

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2010-10-12 01:28:43 -03:00
parent cc59ba29a0
commit 24885e4c81

View File

@ -68,11 +68,11 @@ archiso_pxe_nbd_mount_handler () {
sleep 1
done
msg "::: Setup NBD from ${nbdserver}:9040 at /dev/nbd0"
msg "::: Setup NBD from ${nbdserver} at /dev/nbd0"
if [ "${copytoram}" = "y" ]; then
nbd-client ${nbdserver} 9040 /dev/nbd0
nbd-client ${nbdserver} -N archiso /dev/nbd0
else
nbd-client ${nbdserver} 9040 /dev/nbd0 -persist
nbd-client ${nbdserver} -N archiso /dev/nbd0 -persist
fi
archisodevice=/dev/nbd0