From 794f3c7fb06a67162554941eaea489a1d30f544a Mon Sep 17 00:00:00 2001 From: torben Date: Mon, 13 Apr 2015 20:31:36 +0200 Subject: Fix hook priority. --- testModule/hooks/pre-mount.sh | 5 +++-- testModule/module-setup.sh | 10 ++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'testModule') diff --git a/testModule/hooks/pre-mount.sh b/testModule/hooks/pre-mount.sh index 79ae47fa..0bf80e16 100644 --- a/testModule/hooks/pre-mount.sh +++ b/testModule/hooks/pre-mount.sh @@ -4,6 +4,7 @@ warn '............START.............' insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko local dnbd3_device_node="$(dnbd3-client -h 132.230.4.1 -i stage4/torben/test -r 1 -d /dev/dnbd0)" dnbd3_device_node='/dev/dnbd0' -qemu-img create -f qcow2 -o backing_file="$dnbd3_device_node",backing_fmt=qcow2 /test.qcow2 +# TODO sysroot normally not available yet. +qemu-img create -f qcow2 -o backing_file="$dnbd3_device_node",backing_fmt=qcow2 /sysroot/test.qcow2 insmod /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko -systemd_preserve_process_marker qemu-nbd -c /dev/nbd0 /test.qcow2 +systemd_preserve_process_marker qemu-nbd -c /dev/nbd0 /sysroot/test.qcow2 diff --git a/testModule/module-setup.sh b/testModule/module-setup.sh index 5e0696b4..698ebf62 100644 --- a/testModule/module-setup.sh +++ b/testModule/module-setup.sh @@ -34,11 +34,13 @@ install() { inst "$moddir/binaries/busybox" /usr/bin/busybox inst "$moddir/kernel_modules/dnbd3.ko" /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/dnbd3.ko inst "$moddir/kernel_modules/nbd.ko" /usr/lib/modules/3.10.0-229.1.2.el7.x86_64/extra/nbd.ko - # NOTE: Priority has to be greater than the network cmdline parsing hooks + # NOTE: Priority has to be lower than the network cmdline parsing hooks # since we have to modify the some kernel parameter before. - inst_hook cmdline 100 "$moddir/hooks/cmdline.sh" - inst_hook pre-mount 100 "$moddir/hooks/pre-mount.sh" - inst_hook pre-pivot 100 "$moddir/hooks/pre-pivot.sh" + inst_hook cmdline 1 "$moddir/hooks/cmdline.sh" + # TODO pre-pivot to pre-mount + inst_hook pre-pivot 10 "$moddir/hooks/pre-mount.sh" + # TODO 11 to 10 + inst_hook pre-pivot 11 "$moddir/hooks/pre-pivot.sh" #inst_hook pre-mount 20 "$moddir/setup_network.sh" inst_multiple lsblk ping ip ifconfig sshd htop dhclient tail head cat vim touch sed lsmod insmod qemu-img qemu-nbd sleep route wget find # FINAL: inst_multiple insmod qemu-img qemu-nbd -- cgit v1.2.3-55-g7522