summaryrefslogtreecommitdiff
path: root/archiso/initcpio/hooks
diff options
context:
space:
mode:
authorChristian Hesse <mail@eworm.de>2016-05-25 21:35:12 +0200
committerGerardo Exequiel Pozzi <vmlinuz386@gmail.com>2016-05-25 16:42:46 -0300
commit63c62911acd4dfb588cbff717a9887e1779070a6 (patch)
tree0979656a7579de16fb8ea4dccec8ba99df33cd61 /archiso/initcpio/hooks
parent51b7ed7f18c6978d14f14f245dbff02589bc6b34 (diff)
downloadarchiso32-63c62911acd4dfb588cbff717a9887e1779070a6.tar.xz
move modprobe to run_earlyhook()
Signed-off-by: Christian Hesse <mail@eworm.de>
Diffstat (limited to 'archiso/initcpio/hooks')
-rw-r--r--archiso/initcpio/hooks/archiso_pxe_nbd10
1 files changed, 7 insertions, 3 deletions
diff --git a/archiso/initcpio/hooks/archiso_pxe_nbd b/archiso/initcpio/hooks/archiso_pxe_nbd
index fdb2c2b..532a7e1 100644
--- a/archiso/initcpio/hooks/archiso_pxe_nbd
+++ b/archiso/initcpio/hooks/archiso_pxe_nbd
@@ -1,5 +1,12 @@
# vim: set ft=sh:
+run_earlyhook() {
+ if [[ -n "${ip}" && -n "${archiso_nbd_srv}" ]]; then
+ # Module autoloading like with loop devices does not work, doing manually...
+ modprobe nbd 2> /dev/null
+ fi
+}
+
run_hook() {
if [[ -n "${ip}" && -n "${archiso_nbd_srv}" ]]; then
@@ -13,9 +20,6 @@ run_hook() {
archiso_pxe_nbd_mount_handler () {
newroot="${1}"
- # Module autoloading like with loop devices does not work, doing manually...
- modprobe nbd 2> /dev/null
-
msg ":: Waiting for boot device..."
while ! poll_device /dev/nbd0 30; do
echo "ERROR: boot device didn't show up after 30 seconds..."