summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2011-07-07 15:24:24 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2011-07-09 15:14:50 -0300
commit41dd5bf63370a9a1e71c40d257d0c0a9e9bbe0f8 (patch)
treeb8b47df02f0c89e545a5ca7ef63eb996b99b0258
parentc434f1c9eb4f32f5c04fc86d074d266e71dce0aa (diff)
downloadarchiso32-41dd5bf63370a9a1e71c40d257d0c0a9e9bbe0f8.tar.xz
[archiso_pxe_nbd] Allow change NBD export name.
Requested at FS#25051 Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
-rw-r--r--README2
-rw-r--r--archiso/hooks/archiso_pxe_nbd6
2 files changed, 6 insertions, 2 deletions
diff --git a/README b/README
index 76859ab..632f985 100644
--- a/README
+++ b/README
@@ -59,6 +59,8 @@ INDEX
when option "IPAPPEND" is set to 2 or 3 in config.
BOOTIF=<hardware-address-of-boot-interface>
Default: (set via PXELINUX)
+* archiso_nbd_name= Set NBD export name used by the server.
+ Default: archiso
** hooks/archiso_loop_mnt
diff --git a/archiso/hooks/archiso_pxe_nbd b/archiso/hooks/archiso_pxe_nbd
index 484a27c..588e033 100644
--- a/archiso/hooks/archiso_pxe_nbd
+++ b/archiso/hooks/archiso_pxe_nbd
@@ -55,6 +55,8 @@ run_hook () {
nbdserver=${rootserver}
+ [[ -z "${archiso_nbd_name}" ]] && archiso_nbd_name="archiso"
+
mount_handler="archiso_pxe_nbd_mount_handler"
fi
}
@@ -74,9 +76,9 @@ archiso_pxe_nbd_mount_handler () {
msg "::: Setup NBD from ${nbdserver} at /dev/nbd0"
if [ "${copytoram}" = "y" ]; then
- nbd-client ${nbdserver} -N archiso /dev/nbd0
+ nbd-client ${nbdserver} -N ${archiso_nbd_name} /dev/nbd0
else
- nbd-client ${nbdserver} -N archiso /dev/nbd0 -persist
+ nbd-client ${nbdserver} -N ${archiso_nbd_name} /dev/nbd0 -persist
fi
archisodevice=/dev/nbd0