[arch-releng] [PATCH 1/1] move modprobe to run_earlyhook()

Christian Hesse list at eworm.de
Wed May 25 08:37:23 UTC 2016


From: Christian Hesse <mail at eworm.de>

Signed-off-by: Christian Hesse <mail at eworm.de>
---
 archiso/initcpio/hooks/archiso_pxe_nbd | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/archiso/initcpio/hooks/archiso_pxe_nbd b/archiso/initcpio/hooks/archiso_pxe_nbd
index fdb2c2b..b61cb1b 100644
--- a/archiso/initcpio/hooks/archiso_pxe_nbd
+++ b/archiso/initcpio/hooks/archiso_pxe_nbd
@@ -1,5 +1,10 @@
 # vim: set ft=sh:
 
+run_earlyhook() {
+    # Module autoloading like with loop devices does not work, doing manually...
+    modprobe nbd 2> /dev/null
+}
+
 run_hook() {
     if [[ -n "${ip}" && -n "${archiso_nbd_srv}" ]]; then
 
@@ -13,9 +18,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..."
-- 
2.8.3


More information about the arch-releng mailing list