[archiso_pxe_nbd] Allow change NBD export name.
Requested at FS#25051 Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
parent
c434f1c9eb
commit
41dd5bf633
2
README
2
README
@ -59,6 +59,8 @@ INDEX
|
|||||||
when option "IPAPPEND" is set to 2 or 3 in config.
|
when option "IPAPPEND" is set to 2 or 3 in config.
|
||||||
BOOTIF=<hardware-address-of-boot-interface>
|
BOOTIF=<hardware-address-of-boot-interface>
|
||||||
Default: (set via PXELINUX)
|
Default: (set via PXELINUX)
|
||||||
|
* archiso_nbd_name= Set NBD export name used by the server.
|
||||||
|
Default: archiso
|
||||||
|
|
||||||
|
|
||||||
** hooks/archiso_loop_mnt
|
** hooks/archiso_loop_mnt
|
||||||
|
@ -55,6 +55,8 @@ run_hook () {
|
|||||||
|
|
||||||
nbdserver=${rootserver}
|
nbdserver=${rootserver}
|
||||||
|
|
||||||
|
[[ -z "${archiso_nbd_name}" ]] && archiso_nbd_name="archiso"
|
||||||
|
|
||||||
mount_handler="archiso_pxe_nbd_mount_handler"
|
mount_handler="archiso_pxe_nbd_mount_handler"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -74,9 +76,9 @@ archiso_pxe_nbd_mount_handler () {
|
|||||||
|
|
||||||
msg "::: Setup NBD from ${nbdserver} at /dev/nbd0"
|
msg "::: Setup NBD from ${nbdserver} at /dev/nbd0"
|
||||||
if [ "${copytoram}" = "y" ]; then
|
if [ "${copytoram}" = "y" ]; then
|
||||||
nbd-client ${nbdserver} -N archiso /dev/nbd0
|
nbd-client ${nbdserver} -N ${archiso_nbd_name} /dev/nbd0
|
||||||
else
|
else
|
||||||
nbd-client ${nbdserver} -N archiso /dev/nbd0 -persist
|
nbd-client ${nbdserver} -N ${archiso_nbd_name} /dev/nbd0 -persist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
archisodevice=/dev/nbd0
|
archisodevice=/dev/nbd0
|
||||||
|
Loading…
Reference in New Issue
Block a user